From 16e8c84daa0f2cd3262867fbdd105e9cef29d1ff Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Thu, 15 Feb 2024 21:00:08 -0500 Subject: [PATCH] refactor: OTPDisable needs to return *AccountError --- account/account.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/account/account.go b/account/account.go index cf32df2..f8dad08 100644 --- a/account/account.go +++ b/account/account.go @@ -364,7 +364,7 @@ func (s AccountServiceDefault) OTPEnable(userId uint, code string) error { 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: ""}) }