mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-27 00:09:47 -05:00
Update server/routers/api-router.js
Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
parent
3f425dc160
commit
58533e8f06
@ -310,7 +310,7 @@ router.get("/api/badge/:id/ping/:duration?", cache("5 minutes"), async (request,
|
||||
const requestedMonitorId = parseInt(request.params.id, 10);
|
||||
|
||||
// Default duration is 24 (h) if not defined in queryParam, limited to 720h (30d)
|
||||
let requestedDuration = request.params.duration !== undefined ? request.params.duration : "24";
|
||||
let requestedDuration = request.params.duration !== undefined ? request.params.duration : "24h";
|
||||
const overrideValue = value && parseFloat(value);
|
||||
|
||||
if (/^[0-9]+$/.test(requestedDuration)) {
|
||||
|
Loading…
Reference in New Issue
Block a user