From 37d8d3afe9ec589574c0cc6380a36fa93b1be8f2 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Tue, 18 Nov 2014 11:07:16 -0500 Subject: more APIs on #12 --- cmd/web.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'cmd') 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) -- cgit v1.2.3