update time precisions
This commit is contained in:
parent
55f3ab538a
commit
760391c6eb
1 changed files with 4 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue