handle non-stream request

This commit is contained in:
Archeb
2024-05-18 21:06:04 +08:00
parent 8ba23c6a28
commit ef2145ce06
+1 -1
View File
@@ -39,7 +39,7 @@ app.post("/v1/messages", apiKeyAuth, (req, res) => {
res.setHeader("Access-Control-Allow-Origin", "*"); res.setHeader("Access-Control-Allow-Origin", "*");
try { try {
let jsonBody = JSON.parse(req.rawBody); let jsonBody = JSON.parse(req.rawBody);
if (jsonBody.stream == false) { if (!jsonBody.stream) {
res.send( res.send(
JSON.stringify({ JSON.stringify({
id: uuidv4(), id: uuidv4(),