From 06bcf929cc0df76beca13e97758c1d3eafe92fab Mon Sep 17 00:00:00 2001 From: forget-the-bright Date: Wed, 12 Apr 2023 22:20:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 768aa58..f1a2a70 100644 --- a/index.js +++ b/index.js @@ -29,7 +29,7 @@ app.post("/track", function (req, res) { updateFile(response, body, path); }); } - if (req.body || req.body.hasOwnProperty("status")) { + if (req.body && req.body.hasOwnProperty("status")) { updateFile(res, req.body, req.query.path); } else { readbody(req, res, req.query.path)