Small improvements
This commit is contained in:
@@ -11,15 +11,6 @@ import (
|
||||
)
|
||||
|
||||
func HandleCreateUser(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
if r.Method != http.MethodPost {
|
||||
core.JSONError{
|
||||
Status: core.Error,
|
||||
Message: "This method is not allowed",
|
||||
}.Respond(w, http.StatusMethodNotAllowed)
|
||||
return
|
||||
}
|
||||
|
||||
body, err := io.ReadAll(r.Body)
|
||||
if err != nil {
|
||||
core.JSONError{
|
||||
|
||||
Reference in New Issue
Block a user