mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 19:00:59 +03:00
@@ -57,10 +57,10 @@ const deleteApiKey = async (req: Request, res: Response, next: NextFunction) =>
|
|||||||
// Verify api key
|
// Verify api key
|
||||||
const verifyApiKey = async (req: Request, res: Response, next: NextFunction) => {
|
const verifyApiKey = async (req: Request, res: Response, next: NextFunction) => {
|
||||||
try {
|
try {
|
||||||
if (typeof req.params === 'undefined' || !req.params.apiKey) {
|
if (typeof req.params === 'undefined' || !req.params.apikey) {
|
||||||
throw new InternalFlowiseError(StatusCodes.PRECONDITION_FAILED, `Error: apikeyController.verifyApiKey - apiKey not provided!`)
|
throw new InternalFlowiseError(StatusCodes.PRECONDITION_FAILED, `Error: apikeyController.verifyApiKey - apikey not provided!`)
|
||||||
}
|
}
|
||||||
const apiResponse = await apikeyService.verifyApiKey(req.params.apiKey)
|
const apiResponse = await apikeyService.verifyApiKey(req.params.apikey)
|
||||||
return res.json(apiResponse)
|
return res.json(apiResponse)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
next(error)
|
next(error)
|
||||||
|
|||||||
Reference in New Issue
Block a user