mirror of
https://github.com/nextcloud/passman.git
synced 2025-10-09 13:07:13 +08:00
Remove double if check
This commit is contained in:
parent
c94df47a9f
commit
6672cfa2a8
1 changed files with 24 additions and 26 deletions
|
@ -83,7 +83,7 @@ class VaultController extends ApiController {
|
||||||
$result = array();
|
$result = array();
|
||||||
if ($vault) {
|
if ($vault) {
|
||||||
$credentials = $this->credentialService->getCredentialsByVaultId($vault->getId(), $this->userId);
|
$credentials = $this->credentialService->getCredentialsByVaultId($vault->getId(), $this->userId);
|
||||||
if($vault) {
|
|
||||||
$result = array(
|
$result = array(
|
||||||
'vault_id' => $vault->getId(),
|
'vault_id' => $vault->getId(),
|
||||||
'guid' => $vault->getGuid(),
|
'guid' => $vault->getGuid(),
|
||||||
|
@ -98,11 +98,9 @@ class VaultController extends ApiController {
|
||||||
$result['credentials'] = $credentials;
|
$result['credentials'] = $credentials;
|
||||||
|
|
||||||
$this->vaultService->setLastAccess($vault->getId(), $this->userId);
|
$this->vaultService->setLastAccess($vault->getId(), $this->userId);
|
||||||
} else {
|
|
||||||
$result = array();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return new JSONResponse($result);
|
return new JSONResponse($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue