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

This reverts commit c8e299c8f1.
This commit is contained in:
Garrett Delfosse
2022-10-21 16:04:27 -04:00
committed by GitHub
parent 0d27b59ebb
commit a2fb444911
35 changed files with 1089 additions and 920 deletions

18
coderd/flags.go Normal file
View File

@ -0,0 +1,18 @@
package coderd
import (
"net/http"
"github.com/coder/coder/cli/deployment"
"github.com/coder/coder/coderd/httpapi"
"github.com/coder/coder/coderd/rbac"
)
func (api *API) deploymentFlags(rw http.ResponseWriter, r *http.Request) {
if !api.Authorize(r, rbac.ActionRead, rbac.ResourceDeploymentFlags) {
httpapi.Forbidden(rw)
return
}
httpapi.Write(r.Context(), rw, http.StatusOK, deployment.RemoveSensitiveValues(*api.DeploymentFlags))
}