Re-implement fix for data overwrites

oauth2
Flashfyre 2024-04-30 15:26:13 -04:00
parent 8a17845d42
commit c0a23079fa
1 changed files with 6 additions and 4 deletions

View File

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