update time precisions

This commit is contained in:
1e99 2025-07-01 17:33:19 +02:00
parent 55f3ab538a
commit 760391c6eb

View file

@ -20,19 +20,19 @@ func GetPlayerCounts(db *sql.DB, logger *log.Logger) http.HandlerFunc {
switch query.Get("range") {
case "1d":
timeRange = 60 * 24
precision = 1
precision = 5
case "7d":
timeRange = 7 * 60 * 24
precision = 1
precision = 15
case "30d":
timeRange = 30 * 60 * 24
precision = 5
precision = 60
case "356d":
timeRange = 356 * 60 * 24
precision = 60 * 24
precision = 60 * 12
default:
http.Error(res, "invalid time range", http.StatusBadRequest)