mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-18 04:04:41 -05:00
Chore: reorder cases
Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
parent
dd82f36da3
commit
21b418230c
@ -145,6 +145,10 @@ router.get("/api/badge/:id/status", cache("5 minutes"), async (request, response
|
|||||||
|
|
||||||
badgeValues.label = label ?? "";
|
badgeValues.label = label ?? "";
|
||||||
switch (state) {
|
switch (state) {
|
||||||
|
case 0:
|
||||||
|
badgeValues.color = downColor;
|
||||||
|
badgeValues.message = downLabel;
|
||||||
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
badgeValues.color = upColor;
|
badgeValues.color = upColor;
|
||||||
badgeValues.message = upLabel;
|
badgeValues.message = upLabel;
|
||||||
@ -153,10 +157,6 @@ router.get("/api/badge/:id/status", cache("5 minutes"), async (request, response
|
|||||||
badgeValues.color = maintenanceColor;
|
badgeValues.color = maintenanceColor;
|
||||||
badgeValues.message = maintenanceLabel;
|
badgeValues.message = maintenanceLabel;
|
||||||
break;
|
break;
|
||||||
case 0:
|
|
||||||
badgeValues.color = downColor;
|
|
||||||
badgeValues.message = downLabel;
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
badgeValues.color = badgeConstants.naColor;
|
badgeValues.color = badgeConstants.naColor;
|
||||||
badgeValues.message = "N/A";
|
badgeValues.message = "N/A";
|
||||||
|
Loading…
Reference in New Issue
Block a user