mirror of https://github.com/FlowiseAI/Flowise.git
Fix for 1869 Issue of Update Crendential (#2260)
Fix 1869 Issue of Update Crendentialbugfix/Assistant-File-Download
parent
fa3d21bc30
commit
51058b2a31
|
|
@ -111,6 +111,8 @@ const updateCredential = async (credentialId: string, requestBody: any): Promise
|
|||
if (!credential) {
|
||||
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)
|
||||
await appServer.AppDataSource.getRepository(Credential).merge(credential, updateCredential)
|
||||
const dbResponse = await appServer.AppDataSource.getRepository(Credential).save(credential)
|
||||
|
|
|
|||
Loading…
Reference in New Issue