summaryrefslogtreecommitdiffstats
path: root/routers/routes
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2019-04-03 03:25:05 +0800
committertechknowlogick <matti@mdranta.net>2019-04-02 15:25:05 -0400
commit09fb036ad625ec5178319c30df47aac313fdbbe3 (patch)
tree4e5389c39924532023041d530b02a94d3bf987d2 /routers/routes
parent0a8e63c68292a08d8a7bc4fa397ae41235f086a7 (diff)
downloadgitea-09fb036ad625ec5178319c30df47aac313fdbbe3.tar.gz
gitea-09fb036ad625ec5178319c30df47aac313fdbbe3.zip
fix upload attachments (#6481)
* fix upload attachments * add migration for new column uploader_id on table attachment * fix imports sequence
Diffstat (limited to 'routers/routes')
-rw-r--r--routers/routes/routes.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/routers/routes/routes.go b/routers/routes/routes.go
index 2d720b3c5c..5c6d36befa 100644
--- a/routers/routes/routes.go
+++ b/routers/routes/routes.go
@@ -480,9 +480,12 @@ func RegisterRoutes(m *macaron.Macaron) {
return
}
})
- m.Post("/attachments", repo.UploadAttachment)
}, ignSignIn)
+ m.Group("", func() {
+ m.Post("/attachments", repo.UploadAttachment)
+ }, reqSignIn)
+
m.Group("/:username", func() {
m.Get("/action/:action", user.Action)
}, reqSignIn)