Merge branch 'master' into feature/expand-http-payload-support

This commit is contained in:
Justin Tisdale
2022-09-07 11:34:58 -04:00
8 changed files with 629 additions and 33 deletions

View File

@@ -136,6 +136,7 @@ router.get("/api/badge/:id/status", cache("5 minutes"), async (request, response
const heartbeat = await Monitor.getPreviousHeartbeat(requestedMonitorId);
const state = overrideValue !== undefined ? overrideValue : heartbeat.status === 1;
badgeValues.label = label ? label : "";
badgeValues.color = state ? upColor : downColor;
badgeValues.message = label ?? state ? upLabel : downLabel;
}