From 62fda22afb6937cc7cdf8bc66e02048235246392 Mon Sep 17 00:00:00 2001 From: Nelson Chan Date: Mon, 6 Nov 2023 23:36:59 +0800 Subject: [PATCH] Fix: Support float ping in push route --- 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 e50040f2e2..acf8d56b15 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;