aboutsummaryrefslogtreecommitdiff
path: root/internal/db/two_factor.go
diff options
context:
space:
mode:
authorᴜɴᴋɴᴡᴏɴ <u@gogs.io>2020-03-01 14:55:03 +0800
committerGitHub <noreply@github.com>2020-03-01 14:55:03 +0800
commitf04b2d43509816ecfda93aa5d0d1fd685d9b860f (patch)
tree548c7b0b4ff2f187569e74cf99c19742a44f18aa /internal/db/two_factor.go
parent9c65798902386341a205d52b6b3842e1dc2c751a (diff)
lint: fix some Golang CI lint issues (#5955)
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