diff options
author | Unknwon <u@gogs.io> | 2016-02-02 16:51:14 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-02-02 16:51:14 -0500 |
commit | 5e97693e0e44037bdf60c6399f957102fed7c93c (patch) | |
tree | 5ae0320a24427cd766591abd69bddb5e4d0b9f8d /routers/api/v1/api.go | |
parent | 452bc385febe2fbf45bbc258299e1dafe48a5b1e (diff) | |
parent | b7b30cd85e5cabd9d643013ffb10dafd133b18ea (diff) |
Merge pull request #2506 from sapk/add-branche-api-support
Implement API for branches listing
Diffstat (limited to 'routers/api/v1/api.go')
-rw-r--r-- | routers/api/v1/api.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index 6fe11a07..04b392fc 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("/:branchname",repo.GetBranch) + }) m.Group("/keys", func() { m.Combo("").Get(repo.ListDeployKeys). Post(bind(api.CreateKeyOption{}), repo.CreateDeployKey) |