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',