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

This commit is contained in:
Garrett Delfosse
2022-10-21 16:55:20 -04:00
committed by GitHub
parent d15b4159ef
commit 372fb1f345
35 changed files with 921 additions and 1089 deletions

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(