mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-07 17:01:23 +08:00
Handling DATE_ADD
This commit is contained in:
@@ -831,15 +831,17 @@ let needSetup = false;
|
||||
throw new Error("Invalid period.");
|
||||
}
|
||||
|
||||
const sqlHourOffset = Database.sqlHourOffset();
|
||||
|
||||
let list = await R.getAll(`
|
||||
SELECT *
|
||||
FROM heartbeat
|
||||
WHERE monitor_id = ?
|
||||
AND time > DATETIME('now', '-' || ? || ' hours')
|
||||
AND time > ${sqlHourOffset}
|
||||
ORDER BY time ASC
|
||||
`, [
|
||||
monitorID,
|
||||
period,
|
||||
-period,
|
||||
]);
|
||||
|
||||
callback({
|
||||
|
Reference in New Issue
Block a user