diff options
author | JakobDev <jakobdev@gmx.de> | 2023-09-15 08:13:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-15 08:13:19 +0200 |
commit | c548dde205244a39a26ba98377c0f5cc11da7041 (patch) | |
tree | f9d9e1185609703e320ed07fd2ff3f95dbdcc230 /modules/context | |
parent | [skip ci] Updated translations via Crowdin (diff) | |
download | forgejo-c548dde205244a39a26ba98377c0f5cc11da7041.tar.xz forgejo-c548dde205244a39a26ba98377c0f5cc11da7041.zip |
More refactoring of `db.DefaultContext` (#27083)
Next step of #27065
Diffstat (limited to 'modules/context')
-rw-r--r-- | modules/context/api.go | 2 | ||||
-rw-r--r-- | modules/context/repo.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/context/api.go b/modules/context/api.go index 58532b883d..044ec51b56 100644 --- a/modules/context/api.go +++ b/modules/context/api.go @@ -212,7 +212,7 @@ func (ctx *APIContext) CheckForOTP() { } otpHeader := ctx.Req.Header.Get("X-Gitea-OTP") - twofa, err := auth.GetTwoFactorByUID(ctx.Doer.ID) + twofa, err := auth.GetTwoFactorByUID(ctx, ctx.Doer.ID) if err != nil { if auth.IsErrTwoFactorNotEnrolled(err) { return // No 2FA enrollment for this user diff --git a/modules/context/repo.go b/modules/context/repo.go index 126196b0d3..f9c966d5be 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -598,7 +598,7 @@ func RepoAssignment(ctx *Context) context.CancelFunc { } if ctx.IsSigned { - ctx.Data["IsWatchingRepo"] = repo_model.IsWatching(ctx.Doer.ID, repo.ID) + ctx.Data["IsWatchingRepo"] = repo_model.IsWatching(ctx, ctx.Doer.ID, repo.ID) ctx.Data["IsStaringRepo"] = repo_model.IsStaring(ctx, ctx.Doer.ID, repo.ID) } |