From dd6faf7f9bd0a1dbf986e124ea0f4db249e1da48 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sun, 13 Mar 2016 18:49:16 -0400 Subject: Convert all API handers to use *context.APIContext --- cmd/web.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'cmd/web.go') diff --git a/cmd/web.go b/cmd/web.go index 3a63d084..c57c223f 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -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 { -- cgit v1.2.3