Return 404 if vault is not found

This commit is contained in:
Marcos Zuriaga 2016-10-07 17:04:26 +02:00
parent 616a72990e
commit 5a0f158137
No known key found for this signature in database
GPG key ID: 7D15585354D072FF

View file

@ -11,6 +11,7 @@
namespace OCA\Passman\Controller;
use OCA\Passman\Utility\NotFoundJSONResponse;
use OCP\AppFramework\Db\DoesNotExistException;
use OCP\IRequest;
use OCP\AppFramework\Http\JSONResponse;
@ -78,7 +79,7 @@ class VaultController extends ApiController {
try {
$vault = $this->vaultService->getByGuid($vault_guid, $this->userId);
} catch (DoesNotExistException $e) {
return new NotFoundJSONResponse();
}
$result = array();
if ($vault) {