Bugfix/Update import api keys (#4536)

update import api keys, remove redundant functions
This commit is contained in:
Henry Heng
2025-05-29 17:40:27 +01:00
committed by GitHub
parent 6f8079f6ee
commit 979920ff7f
5 changed files with 45 additions and 33 deletions
+1
View File
@@ -19,6 +19,7 @@ export const validateChatflowAPIKey = async (req: Request, chatflow: ChatFlow) =
if (suppliedKey) {
const keys = await apikeyService.getAllApiKeys()
const apiSecret = keys.find((key: any) => key.id === chatFlowApiKeyId)?.apiSecret
if (!apiSecret) return false
if (!compareKeys(apiSecret, suppliedKey)) return false
return true
}