update CheckPassword
This commit is contained in:
parent
a1e5a1092b
commit
b3d38cabb9
1 changed files with 3 additions and 7 deletions
|
@ -43,15 +43,11 @@ func (storage BlockchainStorage) Delete(id string) (err error) {
|
|||
|
||||
func (storage BlockchainStorage) CheckPassword(id string, secret util.Uint256) (bool, error) {
|
||||
_, err := storage.contract.CheckUser(id, secret)
|
||||
if err == nil {
|
||||
return true, nil
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
if err.Error() == "Password hashes does not match" {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
return false, err
|
||||
return true, nil
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
|
Loading…
Reference in a new issue