mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-23 14:54:05 +00:00
Update server/routers/api-router.js
Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
parent
3f425dc160
commit
58533e8f06
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue