summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/issue_tracked_time.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-12-10 10:46:31 +0800
committerGitHub <noreply@github.com>2022-12-10 10:46:31 +0800
commit68704532c28cf09db96c988291b2f82c5e615984 (patch)
treec6537092dc11054f96b202fdb957755ed116cd99 /routers/api/v1/repo/issue_tracked_time.go
parent097d4e30b180eef30600beef2c08095e2571319c (diff)
downloadgitea-68704532c28cf09db96c988291b2f82c5e615984.tar.gz
gitea-68704532c28cf09db96c988291b2f82c5e615984.zip
Rename almost all Ctx functions (#22071)
Diffstat (limited to 'routers/api/v1/repo/issue_tracked_time.go')
-rw-r--r--routers/api/v1/repo/issue_tracked_time.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/routers/api/v1/repo/issue_tracked_time.go b/routers/api/v1/repo/issue_tracked_time.go
index 6786d23a93..ede60a2ed8 100644
--- a/routers/api/v1/repo/issue_tracked_time.go
+++ b/routers/api/v1/repo/issue_tracked_time.go
@@ -71,7 +71,7 @@ func ListTrackedTimes(ctx *context.APIContext) {
// "404":
// "$ref": "#/responses/notFound"
- if !ctx.Repo.Repository.IsTimetrackerEnabled() {
+ if !ctx.Repo.Repository.IsTimetrackerEnabled(ctx) {
ctx.NotFound("Timetracker is disabled")
return
}
@@ -190,7 +190,7 @@ func AddTime(ctx *context.APIContext) {
}
if !ctx.Repo.CanUseTimetracker(issue, ctx.Doer) {
- if !ctx.Repo.Repository.IsTimetrackerEnabled() {
+ if !ctx.Repo.Repository.IsTimetrackerEnabled(ctx) {
ctx.Error(http.StatusBadRequest, "", "time tracking disabled")
return
}
@@ -271,7 +271,7 @@ func ResetIssueTime(ctx *context.APIContext) {
}
if !ctx.Repo.CanUseTimetracker(issue, ctx.Doer) {
- if !ctx.Repo.Repository.IsTimetrackerEnabled() {
+ if !ctx.Repo.Repository.IsTimetrackerEnabled(ctx) {
ctx.JSON(http.StatusBadRequest, struct{ Message string }{Message: "time tracking disabled"})
return
}
@@ -342,7 +342,7 @@ func DeleteTime(ctx *context.APIContext) {
}
if !ctx.Repo.CanUseTimetracker(issue, ctx.Doer) {
- if !ctx.Repo.Repository.IsTimetrackerEnabled() {
+ if !ctx.Repo.Repository.IsTimetrackerEnabled(ctx) {
ctx.JSON(http.StatusBadRequest, struct{ Message string }{Message: "time tracking disabled"})
return
}
@@ -410,7 +410,7 @@ func ListTrackedTimesByUser(ctx *context.APIContext) {
// "403":
// "$ref": "#/responses/forbidden"
- if !ctx.Repo.Repository.IsTimetrackerEnabled() {
+ if !ctx.Repo.Repository.IsTimetrackerEnabled(ctx) {
ctx.Error(http.StatusBadRequest, "", "time tracking disabled")
return
}
@@ -498,7 +498,7 @@ func ListTrackedTimesByRepository(ctx *context.APIContext) {
// "403":
// "$ref": "#/responses/forbidden"
- if !ctx.Repo.Repository.IsTimetrackerEnabled() {
+ if !ctx.Repo.Repository.IsTimetrackerEnabled(ctx) {
ctx.Error(http.StatusBadRequest, "", "time tracking disabled")
return
}