From a49af93fafe824cdd375318d15de420b3ed61e79 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Mon, 21 Dec 2015 04:24:11 -0800 Subject: #1692 APIs: Users Followers - User profile un/follow - List user's followers/following --- cmd/web.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'cmd') 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) } -- cgit v1.2.3