Commit f434771f authored by Julien Schröter's avatar Julien Schröter

Only updated the currently answering user's experience

parent 121f9a72
Pipeline #1714 canceled with stage
in 1 minute and 14 seconds
......@@ -1255,7 +1255,7 @@ func (m *MySQLDuelQuery) InsertOptionUserAnswer(roundID, questionID, userID uint
m.insertUseranswer(tx, roundquestionID, userID, uint32(score), "option")
// update XP
if _, errExec := tx.Exec("UPDATE `user` SET experience = experience + ?", awards.Experience); errExec != nil {
if _, errExec := tx.Exec("UPDATE `user` SET experience = experience + ? WHERE `iduser`=?", awards.Experience, userID); errExec != nil {
return nil, fmt.Errorf("Could not update user experience. %s", errExec.Error())
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment