properly use client session ID

pull/14/head
Up 7 months ago
parent e7cff35d69
commit 2aab022ce3
No known key found for this signature in database
GPG Key ID: 3B75CD7439FEB388

@ -585,14 +585,6 @@ func handleUpdateAll(w http.ResponseWriter, r *http.Request) {
return return
} }
var clientSessionId string
if r.URL.Query().Has("clientSessionId") {
clientSessionId = r.URL.Query().Get("clientSessionId")
}
if clientSessionId == "" {
clientSessionId = legacyClientSessionId
}
var data CombinedSaveData var data CombinedSaveData
err = json.NewDecoder(r.Body).Decode(&data) err = json.NewDecoder(r.Body).Decode(&data)
if err != nil { if err != nil {
@ -601,7 +593,7 @@ func handleUpdateAll(w http.ResponseWriter, r *http.Request) {
} }
var active bool var active bool
active, err = db.IsActiveSession(uuid, clientSessionId) active, err = db.IsActiveSession(uuid, data.ClientSessionId)
if err != nil { if err != nil {
httpError(w, r, fmt.Errorf("failed to check active session: %s", err), http.StatusBadRequest) httpError(w, r, fmt.Errorf("failed to check active session: %s", err), http.StatusBadRequest)
return return

Loading…
Cancel
Save