From 46f6127aacf91fe641fe561b6eae37e0bd20248c Mon Sep 17 00:00:00 2001 From: Pancakes Date: Fri, 7 Jun 2024 23:10:27 -0400 Subject: [PATCH] Use NoContent status code for DELETE and PUT success --- api/endpoints.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/endpoints.go b/api/endpoints.go index 54edbc0..0d3eea9 100644 --- a/api/endpoints.go +++ b/api/endpoints.go @@ -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) } }