summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorJustin Nuß <justin.nuss@hmmh.de>2014-07-24 09:04:09 +0200
committerJustin Nuß <justin.nuss@hmmh.de>2014-07-24 09:05:15 +0200
commit3c025b395077292a721419942f997311ef575fd9 (patch)
treec50491826df2c9f98fd8489e9352d44e544ff92f /cmd
parent34304e6a0c9a3904b999e3ae1fcc9e6518d3f026 (diff)
downloadgitea-3c025b395077292a721419942f997311ef575fd9.tar.gz
gitea-3c025b395077292a721419942f997311ef575fd9.zip
Add delete route for attachments, remove upload buttons from issues/comments
Diffstat (limited to 'cmd')
-rw-r--r--cmd/web.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/cmd/web.go b/cmd/web.go
index 48622b55cd..0b7aac33b4 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -238,9 +238,14 @@ func runWeb(*cli.Context) {
r.Post("/:index/label", repo.UpdateIssueLabel)
r.Post("/:index/milestone", repo.UpdateIssueMilestone)
r.Post("/:index/assignee", repo.UpdateAssignee)
- r.Post("/:index/attachment", repo.IssuePostAttachment)
- r.Post("/:index/attachment/:id", repo.IssuePostAttachment)
- r.Get("/:index/attachment/:id", repo.IssueGetAttachment)
+
+ m.Group("/:index/attachment", func(r martini.Router) {
+ r.Get("/:id", repo.IssueGetAttachment)
+ r.Post("/", repo.IssuePostAttachment)
+ r.Post("/:comment", repo.IssuePostAttachment)
+ r.Delete("/:comment/:id", repo.IssueDeleteAttachment)
+ })
+
r.Post("/labels/new", bindIgnErr(auth.CreateLabelForm{}), repo.NewLabel)
r.Post("/labels/edit", bindIgnErr(auth.CreateLabelForm{}), repo.UpdateLabel)
r.Post("/labels/delete", repo.DeleteLabel)