aboutsummaryrefslogtreecommitdiff
path: root/internal/db/two_factor.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/db/two_factor.go')
-rw-r--r--internal/db/two_factor.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/db/two_factor.go b/internal/db/two_factor.go
index 45b29705..a46fb992 100644
--- a/internal/db/two_factor.go
+++ b/internal/db/two_factor.go
@@ -118,7 +118,7 @@ func GetTwoFactorByUserID(userID int64) (*TwoFactor, error) {
if err != nil {
return nil, err
} else if !has {
- return nil, errors.TwoFactorNotFound{userID}
+ return nil, errors.TwoFactorNotFound{UserID: userID}
}
return t, nil
@@ -189,7 +189,7 @@ func UseRecoveryCode(userID int64, code string) error {
if err != nil {
return fmt.Errorf("get unused code: %v", err)
} else if !has {
- return errors.TwoFactorRecoveryCodeNotFound{code}
+ return errors.TwoFactorRecoveryCodeNotFound{Code: code}
}
recoveryCode.IsUsed = true