Skip to content

Commit

Permalink
fix error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
n-at committed Sep 3, 2023
1 parent 27b7f76 commit 269da03
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions storage/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ func (s *Storage) UserEnsureExists() error {
Active: true,
}

_, err = s.UserSave(u)
if _, err = s.UserSave(u); err != nil {
return err
}

log.Infof(">>> ================================================")
log.Infof(">>> created default admin user: login=%s password=%s", u.Login, password)
Expand All @@ -144,7 +146,7 @@ func (s *Storage) UserEnsureExists() error {
return nil
}

return err
return nil
}

func userSorted(users []User) []User {
Expand Down

0 comments on commit 269da03

Please sign in to comment.