mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-08 07:49:50 +02:00
unified API error response
This commit is contained in:
1 parent
b1941f1da1
commit
aff49b1c9e
13 files changed
+61
-67
No files matched your search
+2
-2
@@ -226,7 +226,7 @@ func runWeb(ctx *cli.Context) {
|
||||
|
||||
m.Group("", func() {
|
||||
m.Post("/migrate", bindIgnErr(auth.MigrateRepoForm{}), v1.MigrateRepo)
|
||||
m.Delete("/:owner/:reponame", v1.RemoveRepo)
|
||||
m.Delete("/:username/:reponame", v1.DeleteRepo)
|
||||
}, middleware.ApiReqToken())
|
||||
|
||||
m.Group("/:username/:reponame", func() {
|
||||
@@ -239,7 +239,7 @@ func runWeb(ctx *cli.Context) {
|
||||
})
|
||||
|
||||
m.Any("/*", func(ctx *middleware.Context) {
|
||||
ctx.HandleAPI(404, "Page not found")
|
||||
ctx.Error(404)
|
||||
})
|
||||
})
|
||||
}, ignSignIn)
|
||||
|
||||
Reference in new issue
Block a user