Fix setting password

We were not acting on the error returning, and the sql sintax was wrong.
This commit is contained in:
Las Zenow 2018-02-22 09:57:37 +00:00
parent 22065852b2
commit de58f0251e
2 changed files with 9 additions and 4 deletions

View file

@ -74,8 +74,8 @@ func (db *pgDB) SetPassword(name string, pass string) error {
if err != nil {
return err
}
_, err = db.sql.Model(user{}).
Set("pass = ?, salt = ?", hash, salt).
_, err = db.sql.Model(&user{}).
Set("password = ?, salt = ?", hash, salt).
Where("username = ?", name).
Update()
return err