Fix: openrouter payload, player restore (relogin)

This commit is contained in:
Grail Finder
2025-06-23 19:03:11 +03:00
parent 83513b6c6a
commit 661a320fb5
4 changed files with 19 additions and 21 deletions

View File

@ -84,7 +84,11 @@ func HandleFrontLogin(w http.ResponseWriter, r *http.Request) {
abortWithError(w, err.Error())
return
}
userstate := models.InitState(cleanName)
// check if that user was already in db
userstate, err := loadState(cleanName)
if err != nil || userstate == nil {
userstate = models.InitState(cleanName)
}
fi := &models.FullInfo{
State: userstate,
}