mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-06 20:17:21 +08:00
[push type] add ping parameter
This commit is contained in:
@@ -20,6 +20,7 @@ router.get("/api/push/:pushToken", async (request, response) => {
|
||||
try {
|
||||
let pushToken = request.params.pushToken;
|
||||
let msg = request.query.msg || "OK";
|
||||
let ping = request.query.ping;
|
||||
|
||||
let monitor = await R.findOne("monitor", " push_token = ? AND active = 1 ", [
|
||||
pushToken
|
||||
@@ -34,9 +35,7 @@ router.get("/api/push/:pushToken", async (request, response) => {
|
||||
bean.time = R.isoDateTime(dayjs.utc());
|
||||
bean.status = UP;
|
||||
bean.msg = msg;
|
||||
|
||||
// TODO: HOW TO?
|
||||
//bean.ping
|
||||
bean.ping = ping;
|
||||
|
||||
await R.store(bean);
|
||||
|
||||
|
Reference in New Issue
Block a user