Revert "Revert "Revert "feat: Support config files with viper"" (#4693)" (#4695)

This reverts commit 372fb1f345.
This commit is contained in:
Garrett Delfosse
2022-10-21 17:07:38 -04:00
committed by GitHub
parent 372fb1f345
commit e8537067ef
35 changed files with 1089 additions and 921 deletions

View File

@ -92,7 +92,7 @@ type Options struct {
MetricsCacheRefreshInterval time.Duration
AgentStatsRefreshInterval time.Duration
Experimental bool
DeploymentConfig *codersdk.DeploymentConfig
DeploymentFlags *codersdk.DeploymentFlags
}
// New constructs a Coder API handler.
@ -286,9 +286,9 @@ func New(options *Options) *API {
})
})
})
r.Route("/config", func(r chi.Router) {
r.Route("/flags", func(r chi.Router) {
r.Use(apiKeyMiddleware)
r.Get("/deployment", api.deploymentConfig)
r.Get("/deployment", api.deploymentFlags)
})
r.Route("/audit", func(r chi.Router) {
r.Use(