Skip to content

Commit

Permalink
Fix server panic error in connectCard
Browse files Browse the repository at this point in the history
  • Loading branch information
BaptTF committed Apr 27, 2024
1 parent 1c29d6d commit 20e7a43
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backend/internal/models/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@ func (o *Account) VerifyPin(pwd string) bool {
}

func (o *Account) VerifyPassword(pwd string) bool {
ok, _ := hash.Verify(*o.Account.Password, pwd)
if (o.Account.Password != nil) {
ok, _ := hash.Verify(*o.Account.Password, pwd)
return ok
}
return false
}

func (o *Account) IsAdmin() bool {
Expand Down

0 comments on commit 20e7a43

Please sign in to comment.