mirror of
https://github.com/nextcloud/passman.git
synced 2025-09-08 14:04:22 +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);
|
$link, $this->userId, Activity::TYPE_ITEM_ACTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return new JSONResponse($this->credentialService->getCredentialByGUID($credential->getGuid()));
|
||||||
//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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -269,17 +259,7 @@ class CredentialController extends ApiController {
|
||||||
|
|
||||||
$credential = $this->credentialService->updateCredential($credential);
|
$credential = $this->credentialService->updateCredential($credential);
|
||||||
|
|
||||||
|
return new JSONResponse($this->credentialService->getCredentialByGUID($credential->getGuid()));
|
||||||
//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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue