aboutsummaryrefslogtreecommitdiff
path: root/internal/route/user/auth.go
diff options
context:
space:
mode:
authorᴜɴᴋɴᴡᴏɴ <u@gogs.io>2020-04-14 09:41:54 +0800
committerGitHub <noreply@github.com>2020-04-14 09:41:54 +0800
commitcb439a126aa6a2728e423bcfd0d5e948337b8ddb (patch)
treef7d09181fe5b96ea444f7544091673b3c668b9fe /internal/route/user/auth.go
parent659acd48b1a131476fd98a54604fa6416b1cef9d (diff)
db: add tests for two factors (#6099)
* Rename to TwoFactors.Create * Use GORM to execute queries * TwoFactor.GetByUserID * Add tests * Fix failing tests * Add MD5 tests * Add tests for RandomChars
Diffstat (limited to 'internal/route/user/auth.go')
-rw-r--r--internal/route/user/auth.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/route/user/auth.go b/internal/route/user/auth.go
index be23b78d..852c9679 100644
--- a/internal/route/user/auth.go
+++ b/internal/route/user/auth.go
@@ -209,7 +209,7 @@ func LoginTwoFactorPost(c *context.Context) {
return
}
- t, err := db.GetTwoFactorByUserID(userID)
+ t, err := db.TwoFactors.GetByUserID(userID)
if err != nil {
c.Error(err, "get two factor by user ID")
return