feat: Support config files with viper (#4696)

This commit is contained in:
Kyle Carberry
2022-10-21 17:08:23 -05:00
committed by GitHub
parent adc5c1a131
commit 7bc5b89f7a
36 changed files with 1099 additions and 1093 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(