mirror of
https://github.com/pagefaultgames/rogueserver.git
synced 2025-02-16 21:51:29 +08:00
Fix hasGameSession
This commit is contained in:
parent
c1ada7f862
commit
c1098bb415
@ -47,7 +47,7 @@ func (s *Server) HandleAccountInfo(w http.ResponseWriter, r *http.Request) {
|
|||||||
|
|
||||||
_, err = os.Stat("userdata/" + hex.EncodeToString(uuid) + "/session.pzs")
|
_, err = os.Stat("userdata/" + hex.EncodeToString(uuid) + "/session.pzs")
|
||||||
|
|
||||||
response, err := json.Marshal(AccountInfoResponse{Username: username, HasGameSession: err != nil})
|
response, err := json.Marshal(AccountInfoResponse{Username: username, HasGameSession: err == nil})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
http.Error(w, fmt.Sprintf("failed to marshal response json: %s", err), http.StatusInternalServerError)
|
http.Error(w, fmt.Sprintf("failed to marshal response json: %s", err), http.StatusInternalServerError)
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user