mirror of
https://github.com/pagefaultgames/rogueserver.git
synced 2025-02-22 08:31:30 +08:00
Use NoContent status code for DELETE and PUT success
This commit is contained in:
parent
16b73c7130
commit
46f6127aac
@ -202,7 +202,7 @@ func handleSession(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
w.WriteHeader(http.StatusOK)
|
||||
w.WriteHeader(http.StatusNoContent)
|
||||
case "DELETE":
|
||||
err := savedata.DeleteSession(uuid, slot)
|
||||
if err != nil {
|
||||
@ -210,7 +210,7 @@ func handleSession(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
w.WriteHeader(http.StatusOK)
|
||||
w.WriteHeader(http.StatusNoContent)
|
||||
}
|
||||
}
|
||||
|
||||
@ -628,7 +628,7 @@ func handleSystem(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
w.WriteHeader(http.StatusOK)
|
||||
w.WriteHeader(http.StatusNoContent)
|
||||
case "DELETE":
|
||||
err := savedata.DeleteSystem(uuid)
|
||||
if err != nil {
|
||||
@ -636,7 +636,7 @@ func handleSystem(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
w.WriteHeader(http.StatusOK)
|
||||
w.WriteHeader(http.StatusNoContent)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user