Skip to content
Snippets Groups Projects
Commit 7514ca97 authored by Jonah Husson's avatar Jonah Husson
Browse files

fix upsert in db

parent 68204203
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,7 @@ func (impl *DatabaseImpl) DeleteUser(userId string) error {
func (impl *DatabaseImpl) UpsertUser(user *User) error {
_, err := impl.db.Model(user).
OnConflict("(Id) DO UPDATE").
Set("Token = EXCLUDED.Token").Returning("").Insert()
Set("Token = EXCLUDED.Token").Insert()
if err != nil {
return errors.Errorf("Failed to insert user %s: %+v", user.Id, err)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment