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

@ -1,18 +0,0 @@
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))
}