summaryrefslogtreecommitdiffstats
path: root/routers/web/repo/issue_stopwatch.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/repo/issue_stopwatch.go')
-rw-r--r--routers/web/repo/issue_stopwatch.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/routers/web/repo/issue_stopwatch.go b/routers/web/repo/issue_stopwatch.go
index 0e9405fde4..8e8f9555a3 100644
--- a/routers/web/repo/issue_stopwatch.go
+++ b/routers/web/repo/issue_stopwatch.go
@@ -21,16 +21,16 @@ func IssueStopwatch(c *context.Context) {
var showSuccessMessage bool
- if !models.StopwatchExists(c.User.ID, issue.ID) {
+ if !models.StopwatchExists(c.Doer.ID, issue.ID) {
showSuccessMessage = true
}
- if !c.Repo.CanUseTimetracker(issue, c.User) {
+ if !c.Repo.CanUseTimetracker(issue, c.Doer) {
c.NotFound("CanUseTimetracker", nil)
return
}
- if err := models.CreateOrStopIssueStopwatch(c.User, issue); err != nil {
+ if err := models.CreateOrStopIssueStopwatch(c.Doer, issue); err != nil {
c.ServerError("CreateOrStopIssueStopwatch", err)
return
}
@@ -49,12 +49,12 @@ func CancelStopwatch(c *context.Context) {
if c.Written() {
return
}
- if !c.Repo.CanUseTimetracker(issue, c.User) {
+ if !c.Repo.CanUseTimetracker(issue, c.Doer) {
c.NotFound("CanUseTimetracker", nil)
return
}
- if err := models.CancelStopwatch(c.User, issue); err != nil {
+ if err := models.CancelStopwatch(c.Doer, issue); err != nil {
c.ServerError("CancelStopwatch", err)
return
}
@@ -73,7 +73,7 @@ func GetActiveStopwatch(c *context.Context) {
return
}
- _, sw, err := models.HasUserStopwatch(c.User.ID)
+ _, sw, err := models.HasUserStopwatch(c.Doer.ID)
if err != nil {
c.ServerError("HasUserStopwatch", err)
return