summaryrefslogtreecommitdiffstats
path: root/cmd/web.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/web.go')
-rw-r--r--cmd/web.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/cmd/web.go b/cmd/web.go
index 6b0ee9ef9e..74cfb75a03 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -157,7 +157,7 @@ func runWeb(*cli.Context) {
m.Get("/issues", user.Issues)
}, reqSignIn)
- // API routers.
+ // API.
m.Group("/api", func() {
m.Group("/v1", func() {
// Miscellaneous.
@@ -170,9 +170,14 @@ func runWeb(*cli.Context) {
})
// Repositories.
+ m.Get("/user/repos", v1.ListMyRepos)
m.Group("/repos", func() {
m.Get("/search", v1.SearchRepos)
m.Post("/migrate", bindIgnErr(auth.MigrateRepoForm{}), v1.Migrate)
+
+ m.Group("/:username/:reponame", func() {
+ m.Combo("/hooks").Get(v1.ListRepoHooks)
+ }, middleware.ApiRepoAssignment())
})
m.Any("/*", func(ctx *middleware.Context) {
@@ -181,7 +186,7 @@ func runWeb(*cli.Context) {
})
})
- // User routers.
+ // User.
m.Group("/user", func() {
m.Get("/login", user.SignIn)
m.Post("/login", bindIgnErr(auth.SignInForm{}), user.SignInPost)