refactor: OTPDisable needs to return *AccountError
This commit is contained in:
parent
24d491ec4e
commit
16e8c84daa
|
@ -364,7 +364,7 @@ func (s AccountServiceDefault) OTPEnable(userId uint, code string) error {
|
||||||
return s.updateAccountInfo(userId, models.User{OTPEnabled: true})
|
return s.updateAccountInfo(userId, models.User{OTPEnabled: true})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s AccountServiceDefault) OTPDisable(userId uint) error {
|
func (s AccountServiceDefault) OTPDisable(userId uint) *AccountError {
|
||||||
return s.updateAccountInfo(userId, models.User{OTPEnabled: false, OTPSecret: ""})
|
return s.updateAccountInfo(userId, models.User{OTPEnabled: false, OTPSecret: ""})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue