aboutsummaryrefslogtreecommitdiff
path: root/routers/api/v1/api.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/api.go')
-rw-r--r--routers/api/v1/api.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go
index 6fe11a07..0152eec2 100644
--- a/routers/api/v1/api.go
+++ b/routers/api/v1/api.go
@@ -183,7 +183,10 @@ func RegisterRoutes(m *macaron.Macaron) {
m.Patch("/hooks/:id:int", bind(api.EditHookOption{}), repo.EditHook)
m.Get("/raw/*", middleware.RepoRef(), repo.GetRawFile)
m.Get("/archive/*", repo.GetArchive)
-
+ m.Group("/branches", func() {
+ m.Get("",repo.ListBranches)
+ m.Get("/:id",repo.GetBranch)
+ })
m.Group("/keys", func() {
m.Combo("").Get(repo.ListDeployKeys).
Post(bind(api.CreateKeyOption{}), repo.CreateDeployKey)