From d97e07b522cf249f0f222b4123a101f746206b26 Mon Sep 17 00:00:00 2001 From: maru Date: Mon, 8 Apr 2024 20:50:47 -0400 Subject: [PATCH] Fix condition to read save data from request body --- api/generic.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/generic.go b/api/generic.go index d8dbf6f..a9789db 100644 --- a/api/generic.go +++ b/api/generic.go @@ -159,8 +159,8 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) { } var save any - // /savedata/delete specifies datatype, but doesn't expect data in body - if r.URL.Path != "/savedata/delete" { + // /savedata/get and /savedata/delete specify datatype, but don't expect data in body + if r.URL.Path != "/savedata/get" && r.URL.Path != "/savedata/delete" { if datatype == 0 { var system defs.SystemSaveData err = json.NewDecoder(r.Body).Decode(&system)