Small improvements

This commit is contained in:
cdricms
2025-01-16 14:42:20 +01:00
parent 9bbd992e95
commit 2fc8a3f347
7 changed files with 1 additions and 50 deletions

View File

@@ -23,14 +23,6 @@ type UpdateUserArgs struct {
}
func HandleUpdateUser(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodPatch {
core.JSONError{
Status: core.Error,
Message: "Method is not allowed.",
}.Respond(w, http.StatusMethodNotAllowed)
return
}
var updateArgs UpdateUserArgs
body, err := io.ReadAll(r.Body)
if err != nil {
@@ -94,4 +86,3 @@ func HandleUpdateUser(w http.ResponseWriter, r *http.Request) {
Data: user,
}.Respond(w, http.StatusOK)
}