Remove double if check

This commit is contained in:
brantje 2016-10-07 13:01:57 +02:00
parent c94df47a9f
commit 6672cfa2a8
No known key found for this signature in database
GPG key ID: 5FF1D117F918687F

View file

@ -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);
} }