#1692 APIs: Users Followers
- User profile un/follow - List user's followers/following
This commit is contained in:
parent
c62a6b7a12
commit
a49af93faf
27 changed files with 641 additions and 271 deletions
12
cmd/web.go
12
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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue