fix: Project Viewer always seeing a connection error when testing credentials (#10417)

This commit is contained in:
Val
2024-08-15 09:39:48 +01:00
committed by GitHub
parent 6bb57108a1
commit 613cdd2ba2
3 changed files with 79 additions and 22 deletions

View File

@@ -127,11 +127,11 @@ export class CredentialsController {
const mergedCredentials = deepCopy(credentials);
const decryptedData = this.credentialsService.decrypt(storedCredential);
// When a sharee opens a credential, the fields and the credential data are missing
// so the payload will be empty
// When a sharee (or project viewer) opens a credential, the fields and the
// credential data are missing so the payload will be empty
// We need to replace the credential contents with the db version if that's the case
// So the credential can be tested properly
this.credentialsService.replaceCredentialContentsForSharee(
await this.credentialsService.replaceCredentialContentsForSharee(
req.user,
storedCredential,
decryptedData,