diff options
-rw-r--r-- | src/battle.go | 19 | ||||
-rw-r--r-- | src/main.go | 2 |
2 files changed, 11 insertions, 10 deletions
diff --git a/src/battle.go b/src/battle.go index b7584eb..e30cebd 100644 --- a/src/battle.go +++ b/src/battle.go @@ -1219,12 +1219,13 @@ func battleRunHandler(w http.ResponseWriter, r *http.Request) { } // delete a battle -func battleDeleteHandler(w http.ResponseWriter, r *http.Request) { - switch r.Method { - case "DELETE": - - http.Redirect(w, r, fmt.Sprintf("/battle?res=%s", battleid, msg), http.StatusSeeOther) - default: - http.Redirect(w, r, "/", http.StatusMethodNotAllowed) - } -} +// TODO(emile): finish implementing the deletion of battles +// func battleDeleteHandler(w http.ResponseWriter, r *http.Request) { +// switch r.Method { +// case "DELETE": + +// http.Redirect(w, r, fmt.Sprintf("/battle?res=%s", battleid, msg), http.StatusSeeOther) +// default: +// http.Redirect(w, r, "/", http.StatusMethodNotAllowed) +// } +// } diff --git a/src/main.go b/src/main.go index 907ec7e..20c245a 100644 --- a/src/main.go +++ b/src/main.go @@ -92,7 +92,7 @@ func main() { auth_needed.HandleFunc("/battle/quick", battleQuickHandler) auth_needed.HandleFunc("/battle/{id}/submit", battleSubmitHandler) auth_needed.HandleFunc("/battle/{id}/run", battleRunHandler) - auth_needed.HandleFunc("/battle/{id}/delete", battleDeleteHandler) + // auth_needed.HandleFunc("/battle/{id}/delete", battleDeleteHandler) log.Printf("[i] HTTP Server running on %s:%d\n", host, port) log.Fatal(http.ListenAndServe(fmt.Sprintf("%s:%d", host, port), r)) |