server: Implement service_name=all
continuous-integration/drone/push Build is passing Details

master
Luther Wen Xu 2020-04-23 23:32:10 +07:00
parent 2dd0ad173b
commit 62e4645b63
Signed by: chanbakjsd
GPG Key ID: B7D77E3E9D102B70
1 changed files with 3 additions and 0 deletions

@ -52,6 +52,9 @@ func dayHistory(w http.ResponseWriter, req *http.Request) {
return return
} }
} }
if service_name == "all" {
service_name = ""
}
entries := db.GetFromDB(service_name, time.Now().Add(time.Duration(-24)*time.Hour), time.Now()) entries := db.GetFromDB(service_name, time.Now().Add(time.Duration(-24)*time.Hour), time.Now())
if interval == 1 { if interval == 1 {
writeJSON(w, entries) writeJSON(w, entries)