diff options
Diffstat (limited to 'routers/web/repo/issue_stopwatch.go')
-rw-r--r-- | routers/web/repo/issue_stopwatch.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/routers/web/repo/issue_stopwatch.go b/routers/web/repo/issue_stopwatch.go index 4e1f6af039..68f89b258d 100644 --- a/routers/web/repo/issue_stopwatch.go +++ b/routers/web/repo/issue_stopwatch.go @@ -8,8 +8,8 @@ import ( "net/http" "strings" - "code.gitea.io/gitea/models" "code.gitea.io/gitea/models/db" + issues_model "code.gitea.io/gitea/models/issues" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/eventsource" ) @@ -23,7 +23,7 @@ func IssueStopwatch(c *context.Context) { var showSuccessMessage bool - if !models.StopwatchExists(c.Doer.ID, issue.ID) { + if !issues_model.StopwatchExists(c.Doer.ID, issue.ID) { showSuccessMessage = true } @@ -32,7 +32,7 @@ func IssueStopwatch(c *context.Context) { return } - if err := models.CreateOrStopIssueStopwatch(c.Doer, issue); err != nil { + if err := issues_model.CreateOrStopIssueStopwatch(c.Doer, issue); err != nil { c.ServerError("CreateOrStopIssueStopwatch", err) return } @@ -56,12 +56,12 @@ func CancelStopwatch(c *context.Context) { return } - if err := models.CancelStopwatch(c.Doer, issue); err != nil { + if err := issues_model.CancelStopwatch(c.Doer, issue); err != nil { c.ServerError("CancelStopwatch", err) return } - stopwatches, err := models.GetUserStopwatches(c.Doer.ID, db.ListOptions{}) + stopwatches, err := issues_model.GetUserStopwatches(c.Doer.ID, db.ListOptions{}) if err != nil { c.ServerError("GetUserStopwatches", err) return @@ -87,7 +87,7 @@ func GetActiveStopwatch(ctx *context.Context) { return } - _, sw, err := models.HasUserStopwatch(ctx, ctx.Doer.ID) + _, sw, err := issues_model.HasUserStopwatch(ctx, ctx.Doer.ID) if err != nil { ctx.ServerError("HasUserStopwatch", err) return @@ -97,7 +97,7 @@ func GetActiveStopwatch(ctx *context.Context) { return } - issue, err := models.GetIssueByID(sw.IssueID) + issue, err := issues_model.GetIssueByID(ctx, sw.IssueID) if err != nil || issue == nil { ctx.ServerError("GetIssueByID", err) return |