From dc0610dc59b0cb92420108455312a8855112a6b9 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Fri, 3 May 2024 20:30:46 +0200 Subject: [PATCH] Fix 405 result in usersHandler. --- webserver/api.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/webserver/api.go b/webserver/api.go index 8f8bae0..cc0ae7c 100644 --- a/webserver/api.go +++ b/webserver/api.go @@ -259,8 +259,7 @@ func usersHandler(w http.ResponseWriter, r *http.Request, g, pth string) { return } if r.Method != "HEAD" && r.Method != "GET" { - http.Error(w, "method not allowed", - http.StatusMethodNotAllowed) + methodNotAllowed(w, "HEAD", "GET") return } users, etag, err := group.GetUsers(g)