From 85fe2843e0052e2497792efee5a0ecdc059d8f5e Mon Sep 17 00:00:00 2001 From: admin Date: Wed, 14 May 2025 13:16:21 +0000 Subject: [PATCH] Update backend/src/routes/openai.js --- backend/src/routes/openai.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/src/routes/openai.js b/backend/src/routes/openai.js index 99d67b3..fc9c13a 100644 --- a/backend/src/routes/openai.js +++ b/backend/src/routes/openai.js @@ -224,8 +224,7 @@ router.post( '/ask-gpt', wrapAsync(async (req, res) => { const { prompt } = req.body; - const apiKey = req.body.apiKey || req.currentUser?.gpt_key; - if (!prompt || !apiKey) { + if (!prompt) { return res.status(400).send({ success: false, error: 'Question and API key are required',