summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-12-21 04:24:11 -0800
committerUnknwon <u@gogs.io>2015-12-21 04:24:11 -0800
commita49af93fafe824cdd375318d15de420b3ed61e79 (patch)
tree1508c0bbd9f9caf2c3af8163e4e9abe326093558 /cmd
parentc62a6b7a1238524225ec9c214dc5eac7da017663 (diff)
downloadgitea-a49af93fafe824cdd375318d15de420b3ed61e79.tar.gz
gitea-a49af93fafe824cdd375318d15de420b3ed61e79.zip
#1692 APIs: Users Followers
- User profile un/follow - List user's followers/following
Diffstat (limited to 'cmd')
-rw-r--r--cmd/web.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/cmd/web.go b/cmd/web.go
index cf40797ab0..ff881434f6 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -289,7 +289,13 @@ func runWeb(ctx *cli.Context) {
// ***** END: Admin *****
m.Group("", func() {
- m.Get("/:username", user.Profile)
+ m.Group("/:username", func() {
+ m.Get("", user.Profile)
+ m.Get("/followers", user.Followers)
+ m.Get("/following", user.Following)
+ m.Get("/stars", user.Stars)
+ })
+
m.Get("/attachments/:uuid", func(ctx *middleware.Context) {
attach, err := models.GetAttachmentByUUID(ctx.Params(":uuid"))
if err != nil {
@@ -319,6 +325,10 @@ func runWeb(ctx *cli.Context) {
m.Post("/issues/attachments", repo.UploadIssueAttachment)
}, ignSignIn)
+ m.Group("/:username", func() {
+ m.Get("/action/:action", user.Action)
+ }, reqSignIn)
+
if macaron.Env == macaron.DEV {
m.Get("/template/*", dev.TemplatePreview)
}