summaryrefslogtreecommitdiffstats
path: root/modules/context
diff options
context:
space:
mode:
Diffstat (limited to 'modules/context')
-rw-r--r--modules/context/api.go2
-rw-r--r--modules/context/repo.go2
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)
}