From 60538036c60d43799a52c02b37c2da30df405bff Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Thu, 28 Apr 2022 23:44:08 +0800 Subject: [PATCH] [#1108] Change "true" to "up" --- server/routers/api-router.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/routers/api-router.js b/server/routers/api-router.js index 73c728b80..8f5f6d6f2 100644 --- a/server/routers/api-router.js +++ b/server/routers/api-router.js @@ -34,8 +34,8 @@ router.get("/api/push/:pushToken", async (request, response) => { let pushToken = request.params.pushToken; let msg = request.query.msg || "OK"; let ping = request.query.ping || null; - let status = request.query.status || "true"; - status = status === "true" ? UP : DOWN; + let statusString = request.query.status || "up"; + let status = (statusString === "up") ? UP : DOWN; let monitor = await R.findOne("monitor", " push_token = ? AND active = 1 ", [ pushToken