Convert all API handers to use *context.APIContext

This commit is contained in:
Unknwon 2016-03-13 18:49:16 -04:00
parent db4da7beec
commit dd6faf7f9b
20 changed files with 204 additions and 196 deletions

View file

@ -206,12 +206,6 @@ func runWeb(ctx *cli.Context) {
Post(bindIgnErr(auth.InstallForm{}), routers.InstallPost)
m.Get("/^:type(issues|pulls)$", reqSignIn, user.Issues)
// ***** START: API *****
m.Group("/api", func() {
apiv1.RegisterRoutes(m)
}, ignSignIn)
// ***** END: API *****
// ***** START: User *****
m.Group("/user", func() {
m.Get("/login", user.SignIn)
@ -550,6 +544,10 @@ func runWeb(ctx *cli.Context) {
})
// ***** END: Repository *****
m.Group("/api", func() {
apiv1.RegisterRoutes(m)
}, ignSignIn)
// robots.txt
m.Get("/robots.txt", func(ctx *context.Context) {
if setting.HasRobotsTxt {