feat: Support config files with viper (#4558)

This commit is contained in:
Garrett Delfosse
2022-10-21 19:26:39 +00:00
committed by GitHub
parent 2c47cda3d1
commit c8e299c8f1
35 changed files with 920 additions and 1089 deletions
+3 -3
View File
@@ -92,7 +92,7 @@ type Options struct {
MetricsCacheRefreshInterval time.Duration
AgentStatsRefreshInterval time.Duration
Experimental bool
DeploymentFlags *codersdk.DeploymentFlags
DeploymentConfig *codersdk.DeploymentConfig
}
// New constructs a Coder API handler.
@@ -286,9 +286,9 @@ func New(options *Options) *API {
})
})
})
r.Route("/flags", func(r chi.Router) {
r.Route("/config", func(r chi.Router) {
r.Use(apiKeyMiddleware)
r.Get("/deployment", api.deploymentFlags)
r.Get("/deployment", api.deploymentConfig)
})
r.Route("/audit", func(r chi.Router) {
r.Use(