diff options
author | Unknwon <u@gogs.io> | 2016-03-13 18:49:16 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-03-13 18:49:16 -0400 |
commit | dd6faf7f9bd0a1dbf986e124ea0f4db249e1da48 (patch) | |
tree | 7f9e4107eb961712a56160ef544143eee3771653 /cmd | |
parent | db4da7beecd6a8f65bfa264ba18a8cb12303921f (diff) | |
download | gitea-dd6faf7f9bd0a1dbf986e124ea0f4db249e1da48.tar.gz gitea-dd6faf7f9bd0a1dbf986e124ea0f4db249e1da48.zip |
Convert all API handers to use *context.APIContext
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/web.go | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/cmd/web.go b/cmd/web.go index 3a63d0845d..c57c223f19 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 { |