Improve GetUserBans error handling & remove useless delcaration in PostSession

This commit is contained in:
Marco Realacci 2022-12-06 22:25:46 +01:00
parent 3af4ee6c84
commit d20b0029bb
2 changed files with 2 additions and 2 deletions

View file

@ -30,7 +30,6 @@ func (rt *_router) PostSession(w http.ResponseWriter, r *http.Request, ps httpro
uid, err = rt.db.GetUserID(request.Name)
}
if db_errors.EmptySet(err) { // user does not exist
err = nil
uid, err = rt.db.CreateUser(request.Name)
}
if err != nil { // handle any other error