Fix minor issues with session data handling

pull/1/head
Flashfyre 1 year ago
parent c1098bb415
commit b64007a5f2

1
.gitignore vendored

@ -1,2 +1,3 @@
pokerogue-server.exe pokerogue-server.exe
userdata/*

@ -1,6 +1,9 @@
package api package api
import "net/http" import (
"encoding/gob"
"net/http"
)
type Server struct { type Server struct {
Debug bool Debug bool
@ -18,6 +21,9 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
} }
} }
gob.Register([]interface{}{})
gob.Register(map[string]interface{}{})
switch r.URL.Path { switch r.URL.Path {
case "/account/info": case "/account/info":
s.HandleAccountInfo(w, r) s.HandleAccountInfo(w, r)

@ -46,7 +46,6 @@ type SessionSaveData struct {
GameMode GameMode `json:"gameMode"` GameMode GameMode `json:"gameMode"`
Party []PokemonData `json:"party"` Party []PokemonData `json:"party"`
EnemyParty []PokemonData `json:"enemyParty"` EnemyParty []PokemonData `json:"enemyParty"`
EnemyField []PokemonData `json:"enemyField"`
Modifiers []PersistentModifierData `json:"modifiers"` Modifiers []PersistentModifierData `json:"modifiers"`
EnemyModifiers []PersistentModifierData `json:"enemyModifiers"` EnemyModifiers []PersistentModifierData `json:"enemyModifiers"`
Arena ArenaData `json:"arena"` Arena ArenaData `json:"arena"`

Loading…
Cancel
Save