From ef2145ce06ccb434ad3a785ddac74a81e5a673be Mon Sep 17 00:00:00 2001 From: Archeb Date: Sat, 18 May 2024 21:06:04 +0800 Subject: [PATCH] handle non-stream request --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 424d201..1e00f37 100644 --- a/index.js +++ b/index.js @@ -39,7 +39,7 @@ app.post("/v1/messages", apiKeyAuth, (req, res) => { res.setHeader("Access-Control-Allow-Origin", "*"); try { let jsonBody = JSON.parse(req.rawBody); - if (jsonBody.stream == false) { + if (!jsonBody.stream) { res.send( JSON.stringify({ id: uuidv4(),