User and login attempt pages only accept GET
This commit is contained in:
parent
c484e9bbfc
commit
1b7e7ed2c6
|
@ -33,14 +33,14 @@ func (h *AdminHandler) Handler(user *auth.User, company *auth.Company, conn *dat
|
||||||
case http.MethodGet:
|
case http.MethodGet:
|
||||||
serveUserIndex(w, r, user, company, conn)
|
serveUserIndex(w, r, user, company, conn)
|
||||||
default:
|
default:
|
||||||
httplib.MethodNotAllowed(w, r, http.MethodGet, http.MethodPost)
|
httplib.MethodNotAllowed(w, r, http.MethodGet)
|
||||||
}
|
}
|
||||||
case "login-attempts":
|
case "login-attempts":
|
||||||
switch r.Method {
|
switch r.Method {
|
||||||
case http.MethodGet:
|
case http.MethodGet:
|
||||||
serveLoginAttemptIndex(w, r, user, company, conn)
|
serveLoginAttemptIndex(w, r, user, company, conn)
|
||||||
default:
|
default:
|
||||||
httplib.MethodNotAllowed(w, r, http.MethodGet, http.MethodPost)
|
httplib.MethodNotAllowed(w, r, http.MethodGet)
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
http.NotFound(w, r)
|
http.NotFound(w, r)
|
||||||
|
|
Loading…
Reference in New Issue