-
-
Save Juraj-Sulimanovic/e257361f7eaf2b57bbfd7c90455eac20 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (req.method !== 'POST') { | |
res.status(405).json({ error: 'Method not allowed' }); | |
return; | |
} | |
if (!question) { | |
return res.status(400).json({ message: 'No question in the request' }); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment