优化结构
This commit is contained in:
@@ -65,7 +65,7 @@ func NewGinEngineWithRuntime(runtime *config.Store, access *systemservice.Access
|
||||
if snapshot != nil && snapshot.Admin != nil && snapshot.Admin.App != nil {
|
||||
env = strings.ToLower(strings.TrimSpace(snapshot.Admin.App.Env))
|
||||
}
|
||||
if env != "production" && env != "prod" && env != "live" && env != "staging" {
|
||||
if env == "" || env == "development" || env == "dev" || env == "test" || env == "local" {
|
||||
registerSwagger(engine, prefix, version, logger)
|
||||
}
|
||||
staticfiles.Register(engine, runtime)
|
||||
|
||||
Reference in New Issue
Block a user