mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-03 00:44:35 -04:00
Convert all API handers to use *context.APIContext
This commit is contained in:
parent
db4da7beec
commit
dd6faf7f9b
20 changed files with 204 additions and 196 deletions
10
cmd/web.go
10
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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue