|
|
@ -34,8 +34,8 @@ router.get("/api/push/:pushToken", async (request, response) => {
|
|
|
|
let pushToken = request.params.pushToken;
|
|
|
|
let pushToken = request.params.pushToken;
|
|
|
|
let msg = request.query.msg || "OK";
|
|
|
|
let msg = request.query.msg || "OK";
|
|
|
|
let ping = request.query.ping || null;
|
|
|
|
let ping = request.query.ping || null;
|
|
|
|
let status = request.query.status || "true";
|
|
|
|
let statusString = request.query.status || "up";
|
|
|
|
status = status === "true" ? UP : DOWN;
|
|
|
|
let status = (statusString === "up") ? UP : DOWN;
|
|
|
|
|
|
|
|
|
|
|
|
let monitor = await R.findOne("monitor", " push_token = ? AND active = 1 ", [
|
|
|
|
let monitor = await R.findOne("monitor", " push_token = ? AND active = 1 ", [
|
|
|
|
pushToken
|
|
|
|
pushToken
|
|
|
|