diff options
author | Unknwon <joe2010xtmf@163.com> | 2014-11-18 11:07:16 -0500 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2014-11-18 11:07:16 -0500 |
commit | 37d8d3afe9ec589574c0cc6380a36fa93b1be8f2 (patch) | |
tree | 30d7751228cdded099b1a0e2952d66dbe6d403b6 /cmd/web.go | |
parent | db0026c5070f8e6b82170a75b5f92a54b7b96ff2 (diff) | |
download | gitea-37d8d3afe9ec589574c0cc6380a36fa93b1be8f2.tar.gz gitea-37d8d3afe9ec589574c0cc6380a36fa93b1be8f2.zip |
more APIs on #12
Diffstat (limited to 'cmd/web.go')
-rw-r--r-- | cmd/web.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/cmd/web.go b/cmd/web.go index 5b81537f79..de222d6fae 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -172,6 +172,14 @@ func runWeb(*cli.Context) { // Users. m.Group("/users", func() { m.Get("/search", v1.SearchUsers) + + m.Group("/:username", func() { + m.Get("", v1.GetUserInfo) + + m.Group("/tokens", func() { + m.Combo("").Get(v1.ListAccessTokens).Post(bind(v1.CreateAccessTokenForm{}), v1.CreateAccessToken) + }, middleware.ApiReqBasicAuth()) + }) }) // Repositories. @@ -388,7 +396,7 @@ func runWeb(*cli.Context) { m.Get("/archive/*", repo.Download) m.Get("/issues2/", repo.Issues2) m.Get("/pulls2/", repo.PullRequest2) - m.Get("/labels2/",repo.Labels2) + m.Get("/labels2/", repo.Labels2) m.Group("", func() { m.Get("/src/*", repo.Home) |