Skip to content

Commit 969d611

Browse files
committed
fix mistakes
1 parent afe5f03 commit 969d611

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

routers/api/v1/repo/issue_stopwatch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func StartIssueStopwatch(ctx *context.APIContext) {
5757
ctx.APIErrorInternal(err)
5858
return
5959
} else if !ok {
60-
ctx.APIError(http.StatusConflict, "annot start a stopwatch again if it already exists")
60+
ctx.APIError(http.StatusConflict, "cannot start a stopwatch again if it already exists")
6161
return
6262
}
6363

services/issue/status.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ func CloseIssue(ctx context.Context, issue *issues_model.Issue, doer *user_model
2424
comment, err := issues_model.CloseIssue(dbCtx, issue, doer)
2525
if err != nil {
2626
if issues_model.IsErrDependenciesLeft(err) {
27-
if err := issues_model.FinishIssueStopwatchIfPossible(dbCtx, doer, issue); err != nil {
27+
if _, err := issues_model.FinishIssueStopwatch(dbCtx, doer, issue); err != nil {
2828
log.Error("Unable to stop stopwatch for issue[%d]#%d: %v", issue.ID, issue.Index, err)
2929
}
3030
}
3131
return err
3232
}
3333

34-
if err := issues_model.FinishIssueStopwatchIfPossible(dbCtx, doer, issue); err != nil {
34+
if _, err := issues_model.FinishIssueStopwatch(dbCtx, doer, issue); err != nil {
3535
return err
3636
}
3737

0 commit comments

Comments
 (0)