chore: initial commit for 30d badge/chart UI support

This commit is contained in:
Tore Stendal Lønøy
2025-02-05 10:38:14 +01:00
parent 9d8928dee0
commit 26851eff38
5 changed files with 32 additions and 13 deletions

View File

@@ -23,7 +23,7 @@ func UptimeRaw(c *fiber.Ctx) error {
case "1h":
from = time.Now().Add(-2 * time.Hour) // Because uptime metrics are stored by hour, we have to cheat a little
default:
return c.Status(400).SendString("Durations supported: 30d,7d, 24h, 1h")
return c.Status(400).SendString("Durations supported: 30d, 7d, 24h, 1h")
}
key := c.Params("key")
uptime, err := store.Get().GetUptimeByKey(key, from, time.Now())