small bug fix

This commit is contained in:
ston1th 2018-10-27 21:41:23 +02:00
commit d362159693
2 changed files with 9 additions and 6 deletions

View file

@ -168,6 +168,9 @@ func (db *DB) UpdateUserSecret(username, secret string) error {
}
func (db *DB) UpdateUserPassword(username, password string) error {
if password == "" {
return errors.New("empty password")
}
u, err := db.GetUser(username)
if err != nil {
return err