mirror of
https://github.com/pagefaultgames/rogueserver.git
synced 2025-02-28 11:31:30 +08:00
properly use client session ID
This commit is contained in:
parent
e7cff35d69
commit
2aab022ce3
@ -585,14 +585,6 @@ func handleUpdateAll(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
var clientSessionId string
|
||||
if r.URL.Query().Has("clientSessionId") {
|
||||
clientSessionId = r.URL.Query().Get("clientSessionId")
|
||||
}
|
||||
if clientSessionId == "" {
|
||||
clientSessionId = legacyClientSessionId
|
||||
}
|
||||
|
||||
var data CombinedSaveData
|
||||
err = json.NewDecoder(r.Body).Decode(&data)
|
||||
if err != nil {
|
||||
@ -601,7 +593,7 @@ func handleUpdateAll(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
var active bool
|
||||
active, err = db.IsActiveSession(uuid, clientSessionId)
|
||||
active, err = db.IsActiveSession(uuid, data.ClientSessionId)
|
||||
if err != nil {
|
||||
httpError(w, r, fmt.Errorf("failed to check active session: %s", err), http.StatusBadRequest)
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user