mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
format with gofumpt (#18184)
* gofumpt -w -l . * gofumpt -w -l -extra . * Add linter * manual fix * change make fmt
This commit is contained in:
@@ -56,9 +56,9 @@ const (
|
||||
func CorsHandler() func(next http.Handler) http.Handler {
|
||||
if setting.CORSConfig.Enabled {
|
||||
return cors.Handler(cors.Options{
|
||||
//Scheme: setting.CORSConfig.Scheme, // FIXME: the cors middleware needs scheme option
|
||||
// Scheme: setting.CORSConfig.Scheme, // FIXME: the cors middleware needs scheme option
|
||||
AllowedOrigins: setting.CORSConfig.AllowDomain,
|
||||
//setting.CORSConfig.AllowSubdomain // FIXME: the cors middleware needs allowSubdomain option
|
||||
// setting.CORSConfig.AllowSubdomain // FIXME: the cors middleware needs allowSubdomain option
|
||||
AllowedMethods: setting.CORSConfig.Methods,
|
||||
AllowCredentials: setting.CORSConfig.AllowCredentials,
|
||||
MaxAge: int(setting.CORSConfig.MaxAge.Seconds()),
|
||||
@@ -459,7 +459,6 @@ func RegisterRoutes(m *web.Route) {
|
||||
m.Post("/msteams/new", bindIgnErr(forms.NewMSTeamsHookForm{}), repo.MSTeamsHooksNewPost)
|
||||
m.Post("/feishu/new", bindIgnErr(forms.NewFeishuHookForm{}), repo.FeishuHooksNewPost)
|
||||
m.Post("/wechatwork/new", bindIgnErr(forms.NewWechatWorkHookForm{}), repo.WechatworkHooksNewPost)
|
||||
|
||||
})
|
||||
|
||||
m.Group("/auths", func() {
|
||||
@@ -691,7 +690,6 @@ func RegisterRoutes(m *web.Route) {
|
||||
m.Post("/{lid}/unlock", repo.LFSUnlock)
|
||||
})
|
||||
})
|
||||
|
||||
}, func(ctx *context.Context) {
|
||||
ctx.Data["PageIsSettings"] = true
|
||||
ctx.Data["LFSStartServer"] = setting.LFS.StartServer
|
||||
@@ -818,7 +816,6 @@ func RegisterRoutes(m *web.Route) {
|
||||
m.Post("/delete", repo.DeleteBranchPost)
|
||||
m.Post("/restore", repo.RestoreBranchPost)
|
||||
}, context.RepoMustNotBeArchived(), reqRepoCodeWriter, repo.MustBeNotEmpty)
|
||||
|
||||
}, reqSignIn, context.RepoAssignment, context.UnitTypes())
|
||||
|
||||
// Releases
|
||||
@@ -857,7 +854,6 @@ func RegisterRoutes(m *web.Route) {
|
||||
}
|
||||
ctx.Data["CommitsCount"] = ctx.Repo.CommitsCount
|
||||
})
|
||||
|
||||
}, ignSignIn, context.RepoAssignment, context.UnitTypes(), reqRepoReleaseReader)
|
||||
|
||||
// to maintain compatibility with old attachments
|
||||
@@ -1085,5 +1081,4 @@ func RegisterRoutes(m *web.Route) {
|
||||
ctx := context.GetContext(req)
|
||||
ctx.NotFound("", nil)
|
||||
})
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user