[#1108] Change "true" to "up"

This commit is contained in:
Louis Lam 2022-04-28 23:44:08 +08:00
parent 0ba5d031d0
commit 60538036c6

View File

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