From 38efd97b28fe940870f7a7cef41e2bbb92a63251 Mon Sep 17 00:00:00 2001 From: Nelson Chan <3271800+chakflying@users.noreply.github.com> Date: Thu, 9 Nov 2023 23:39:44 +0800 Subject: [PATCH] Fix: Support float ping in push route (#3987) --- server/routers/api-router.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/routers/api-router.js b/server/routers/api-router.js index e50040f2..acf8d56b 100644 --- a/server/routers/api-router.js +++ b/server/routers/api-router.js @@ -49,7 +49,7 @@ router.get("/api/push/:pushToken", async (request, response) => { let pushToken = request.params.pushToken; let msg = request.query.msg || "OK"; - let ping = parseInt(request.query.ping) || null; + let ping = parseFloat(request.query.ping) || null; let statusString = request.query.status || "up"; let status = (statusString === "up") ? UP : DOWN;