see if this is even invoked

This commit is contained in:
Kevin Grüneberg committed 2023-10-27 16:16:34 +02:00
1 parent f67623ebad
commit 86c3973ffa
2 files changed
+5

No files matched your search

+2
View File
@@ -31,6 +31,8 @@ export default async function apiWrapper(
}
}
console.log({ method: req.method })
const func = wrapApiHandlerWithSentry(handler as any, path)
// @ts-ignore
return await func(req, res)
+3
View File
@@ -43,12 +43,15 @@ const completionFunctions = {
}
async function handler(req: NextApiRequest, res: NextApiResponse) {
console.log('inside handler')
if (!openAiKey) {
return res.status(500).json({
error: 'No OPENAI_KEY set. Create this environment variable to use AI features.',
})
}
console.log({ method: req.method })
const { method } = req
switch (method) {