aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/repo/issue_stopwatch.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/repo/issue_stopwatch.go')
-rw-r--r--routers/api/v1/repo/issue_stopwatch.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/routers/api/v1/repo/issue_stopwatch.go b/routers/api/v1/repo/issue_stopwatch.go
index a4a2261b9a..2ab6457d7f 100644
--- a/routers/api/v1/repo/issue_stopwatch.go
+++ b/routers/api/v1/repo/issue_stopwatch.go
@@ -55,8 +55,8 @@ func StartIssueStopwatch(ctx *context.APIContext) {
return
}
- if err := models.CreateOrStopIssueStopwatch(ctx.User, issue); err != nil {
- ctx.Error(http.StatusInternalServerError, "CreateOrStopIssueStopwatch", err)
+ if err := models.CreateIssueStopwatch(ctx.User, issue); err != nil {
+ ctx.Error(http.StatusInternalServerError, "CreateIssueStopwatch", err)
return
}
@@ -104,8 +104,8 @@ func StopIssueStopwatch(ctx *context.APIContext) {
return
}
- if err := models.CreateOrStopIssueStopwatch(ctx.User, issue); err != nil {
- ctx.Error(http.StatusInternalServerError, "CreateOrStopIssueStopwatch", err)
+ if err := models.FinishIssueStopwatch(ctx.User, issue); err != nil {
+ ctx.Error(http.StatusInternalServerError, "FinishIssueStopwatch", err)
return
}