mirror of
https://github.com/pagefaultgames/rogueserver.git
synced 2025-02-22 16:41:28 +08:00
Fix condition to read save data from request body
This commit is contained in:
parent
977a05049e
commit
d97e07b522
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user