Re-implement fix for data overwrites

pull/4/head
Flashfyre 6 months ago
parent 8a17845d42
commit c0a23079fa

@ -224,11 +224,13 @@ func handleSaveData(w http.ResponseWriter, r *http.Request) {
var active bool var active bool
if r.URL.Path == "/savedata/get" { if r.URL.Path == "/savedata/get" {
if datatype == 0 {
err = db.UpdateActiveSession(uuid, token) err = db.UpdateActiveSession(uuid, token)
if err != nil { if err != nil {
httpError(w, r, fmt.Errorf("failed to update active session: %s", err), http.StatusBadRequest) httpError(w, r, fmt.Errorf("failed to update active session: %s", err), http.StatusBadRequest)
return return
} }
}
} else { } else {
active, err = db.IsActiveSession(token) active, err = db.IsActiveSession(token)
if err != nil { if err != nil {

Loading…
Cancel
Save