1
0
mirror of https://github.com/newnius/YAO-scheduler.git synced 2025-12-15 08:16:43 +00:00
This commit is contained in:
2019-04-12 17:21:09 +08:00
parent 804dfa969f
commit 5877310950
5 changed files with 90 additions and 5 deletions

View File

@@ -70,6 +70,14 @@ func serverAPI(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
w.Write(js)
break
case "summary":
fmt.Println("summary")
js, _ := json.Marshal(allocator.summary())
w.Header().Set("Content-Type", "application/json")
w.Write(js)
break
default:
http.Error(w, "Not Found", http.StatusNotFound)
break