Fix: Support float ping in push route (#3987)

This commit is contained in:
Nelson Chan 2023-11-09 23:39:44 +08:00 committed by GitHub
parent ce0ba6c0ca
commit 38efd97b28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;