Remove GET from login route

Will be replaced by vue frontend
This commit is contained in:
gmemstr 2017-12-27 11:31:44 -08:00
parent 04cabdb84d
commit 8fcbd02fc4

View file

@ -75,7 +75,7 @@ func Init() *mux.Router {
r.Handle("/login", Handle(
loginHandler(),
)).Methods("GET", "POST")
)).Methods("POST")
r.Handle("/admin/publish", Handle(
auth.RequireAuthorization(0),
@ -141,11 +141,6 @@ func loginHandler() common.Handler {
return nil
}
if r.Method == "GET" {
w.Header().Set("Content-Type", "text/html")
return common.ReadAndServeFile("assets/web/login.html", w)
}
err = r.ParseForm()
if err != nil {
return &common.HTTPError{