mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-29 09:01:06 +03:00
Fix for 1869 Issue of Update Crendential (#2260)
Fix 1869 Issue of Update Crendential
This commit is contained in:
@@ -111,6 +111,8 @@ const updateCredential = async (credentialId: string, requestBody: any): Promise
|
|||||||
if (!credential) {
|
if (!credential) {
|
||||||
throw new InternalFlowiseError(StatusCodes.NOT_FOUND, `Credential ${credentialId} not found`)
|
throw new InternalFlowiseError(StatusCodes.NOT_FOUND, `Credential ${credentialId} not found`)
|
||||||
}
|
}
|
||||||
|
const decryptedCredentialData = await decryptCredentialData(credential.encryptedData)
|
||||||
|
requestBody.plainDataObj = { ...decryptedCredentialData, ...requestBody.plainDataObj }
|
||||||
const updateCredential = await transformToCredentialEntity(requestBody)
|
const updateCredential = await transformToCredentialEntity(requestBody)
|
||||||
await appServer.AppDataSource.getRepository(Credential).merge(credential, updateCredential)
|
await appServer.AppDataSource.getRepository(Credential).merge(credential, updateCredential)
|
||||||
const dbResponse = await appServer.AppDataSource.getRepository(Credential).save(credential)
|
const dbResponse = await appServer.AppDataSource.getRepository(Credential).save(credential)
|
||||||
|
|||||||
Reference in New Issue
Block a user