diff options
author | ᴜɴᴋɴᴡᴏɴ <u@gogs.io> | 2020-04-14 09:41:54 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-14 09:41:54 +0800 |
commit | cb439a126aa6a2728e423bcfd0d5e948337b8ddb (patch) | |
tree | f7d09181fe5b96ea444f7544091673b3c668b9fe /internal/route/user/auth.go | |
parent | 659acd48b1a131476fd98a54604fa6416b1cef9d (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.go | 2 |
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 |