mirror of
https://github.com/go-gitea/gitea
synced 2025-07-12 13:37:20 +00:00
@ -152,7 +152,7 @@ func DeleteIssueStopwatch(ctx *context.APIContext) {
|
||||
return
|
||||
}
|
||||
|
||||
if err := issues_model.CancelStopwatch(ctx.Doer, issue); err != nil {
|
||||
if err := issues_model.CancelStopwatch(ctx, ctx.Doer, issue); err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, "CancelStopwatch", err)
|
||||
return
|
||||
}
|
||||
@ -182,7 +182,7 @@ func prepareIssueStopwatch(ctx *context.APIContext, shouldExist bool) (*issues_m
|
||||
return nil, errors.New("Cannot use time tracker")
|
||||
}
|
||||
|
||||
if issues_model.StopwatchExists(ctx.Doer.ID, issue.ID) != shouldExist {
|
||||
if issues_model.StopwatchExists(ctx, ctx.Doer.ID, issue.ID) != shouldExist {
|
||||
if shouldExist {
|
||||
ctx.Error(http.StatusConflict, "StopwatchExists", "cannot stop/cancel a non existent stopwatch")
|
||||
err = errors.New("cannot stop/cancel a non existent stopwatch")
|
||||
@ -218,13 +218,13 @@ func GetStopwatches(ctx *context.APIContext) {
|
||||
// "200":
|
||||
// "$ref": "#/responses/StopWatchList"
|
||||
|
||||
sws, err := issues_model.GetUserStopwatches(ctx.Doer.ID, utils.GetListOptions(ctx))
|
||||
sws, err := issues_model.GetUserStopwatches(ctx, ctx.Doer.ID, utils.GetListOptions(ctx))
|
||||
if err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, "GetUserStopwatches", err)
|
||||
return
|
||||
}
|
||||
|
||||
count, err := issues_model.CountUserStopwatches(ctx.Doer.ID)
|
||||
count, err := issues_model.CountUserStopwatches(ctx, ctx.Doer.ID)
|
||||
if err != nil {
|
||||
ctx.InternalServerError(err)
|
||||
return
|
||||
|
Reference in New Issue
Block a user