mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-09-07 18:02:42 +00:00
Fix: Wrong datatype for avgPing (#3724)
This commit is contained in:
parent
99179c82d7
commit
5b7206f8e2
@ -1137,7 +1137,7 @@ class Monitor extends BeanModel {
|
|||||||
if (hasClients) {
|
if (hasClients) {
|
||||||
// Send 24 hour average ping
|
// Send 24 hour average ping
|
||||||
let data24h = await uptimeCalculator.get24Hour();
|
let data24h = await uptimeCalculator.get24Hour();
|
||||||
io.to(userID).emit("avgPing", monitorID, (data24h.avgPing) ? data24h.avgPing.toFixed(2) : null);
|
io.to(userID).emit("avgPing", monitorID, (data24h.avgPing) ? Number(data24h.avgPing.toFixed(2)) : null);
|
||||||
|
|
||||||
// Send 24 hour uptime
|
// Send 24 hour uptime
|
||||||
io.to(userID).emit("uptime", monitorID, 24, data24h.uptime);
|
io.to(userID).emit("uptime", monitorID, 24, data24h.uptime);
|
||||||
|
Loading…
Reference in New Issue
Block a user