User and login attempt pages only accept GET

This commit is contained in:
jordi fita mas 2024-01-18 19:34:58 +01:00
parent c484e9bbfc
commit 1b7e7ed2c6
1 changed files with 2 additions and 2 deletions

View File

@ -33,14 +33,14 @@ func (h *AdminHandler) Handler(user *auth.User, company *auth.Company, conn *dat
case http.MethodGet:
serveUserIndex(w, r, user, company, conn)
default:
httplib.MethodNotAllowed(w, r, http.MethodGet, http.MethodPost)
httplib.MethodNotAllowed(w, r, http.MethodGet)
}
case "login-attempts":
switch r.Method {
case http.MethodGet:
serveLoginAttemptIndex(w, r, user, company, conn)
default:
httplib.MethodNotAllowed(w, r, http.MethodGet, http.MethodPost)
httplib.MethodNotAllowed(w, r, http.MethodGet)
}
default:
http.NotFound(w, r)