summaryrefslogtreecommitdiffstats
path: root/routers/repo/issue_watch.go
diff options
context:
space:
mode:
authorMorgan Bazalgette <git@howl.moe>2018-01-10 22:34:17 +0100
committerLauris BH <lauris@nix.lv>2018-01-10 23:34:17 +0200
commit65861900cda3bb6d9e2aa80b808b0000383c04b3 (patch)
tree8569d93b6ef092b30b35a4d4da906c6b6950e2ee /routers/repo/issue_watch.go
parent45c264f681e3f7e1a22a191029836a690959aac3 (diff)
downloadgitea-65861900cda3bb6d9e2aa80b808b0000383c04b3.tar.gz
gitea-65861900cda3bb6d9e2aa80b808b0000383c04b3.zip
Handle refactor (#3339)
* Replace all ctx.Handle with ctx.ServerError or ctx.NotFound * Change Handle(403) to NotFound, avoid using macaron's NotFound
Diffstat (limited to 'routers/repo/issue_watch.go')
-rw-r--r--routers/repo/issue_watch.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/repo/issue_watch.go b/routers/repo/issue_watch.go
index 42ffaec5b8..a499b70d9c 100644
--- a/routers/repo/issue_watch.go
+++ b/routers/repo/issue_watch.go
@@ -17,7 +17,7 @@ import (
func IssueWatch(c *context.Context) {
watch, err := strconv.ParseBool(c.Req.PostForm.Get("watch"))
if err != nil {
- c.Handle(http.StatusInternalServerError, "watch is not bool", err)
+ c.ServerError("watch is not bool", err)
return
}
@@ -27,7 +27,7 @@ func IssueWatch(c *context.Context) {
}
if err := models.CreateOrUpdateIssueWatch(c.User.ID, issue.ID, watch); err != nil {
- c.Handle(http.StatusInternalServerError, "CreateOrUpdateIssueWatch", err)
+ c.ServerError("CreateOrUpdateIssueWatch", err)
return
}