mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-07-23 23:11:13 -04:00
[push type] add ping parameter
This commit is contained in:
parent
9d079eeec0
commit
7fa1cb83af
3 changed files with 9 additions and 6 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue