mirror of
https://github.com/nextcloud/passman.git
synced 2025-02-25 07:53:32 +08:00
Merge remote-tracking branch 'fix_486' into feature/merges_v2.2.0
This commit is contained in:
commit
7bd92aec77
1 changed files with 2 additions and 22 deletions
|
@ -105,17 +105,7 @@ class CredentialController extends ApiController {
|
|||
$link, $this->userId, Activity::TYPE_ITEM_ACTION);
|
||||
}
|
||||
|
||||
|
||||
//fetch the proper credentialelement, the returned element from createCredential is not usable in the frontend.
|
||||
$credentials = $this->credentialService->getCredentialsByVaultId($vault_id, $this->userId);
|
||||
foreach ($credentials as &$value) {
|
||||
if($value->getGuid() == $credential->getGuid()){
|
||||
return new JSONResponse($value);
|
||||
}
|
||||
}
|
||||
|
||||
//return old value as fallback
|
||||
return new JSONResponse($credentials);
|
||||
return new JSONResponse($this->credentialService->getCredentialByGUID($credential->getGuid()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -269,17 +259,7 @@ class CredentialController extends ApiController {
|
|||
|
||||
$credential = $this->credentialService->updateCredential($credential);
|
||||
|
||||
|
||||
//fetch the proper credentialelement, the returned element from createCredential is not usable in the frontend.
|
||||
$credentials = $this->credentialService->getCredentialsByVaultId($vault_id, $this->userId);
|
||||
foreach ($credentials as &$value) {
|
||||
if($value->getGuid() == $credential->getGuid()){
|
||||
return new JSONResponse($value);
|
||||
}
|
||||
}
|
||||
|
||||
//return old value as fallback
|
||||
return new JSONResponse($credential);
|
||||
return new JSONResponse($this->credentialService->getCredentialByGUID($credential->getGuid()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue