@Summary Get deployment config @ID get-deployment-config @Security CoderSessionToken @Produce json @Tags General @Success 200 {object} codersdk.DeploymentConfig @Router /api/v2/deployment/config [get]
(rw http.ResponseWriter, r *http.Request)
| 17 | // @Success 200 {object} codersdk.DeploymentConfig |
| 18 | // @Router /api/v2/deployment/config [get] |
| 19 | func (api *API) deploymentValues(rw http.ResponseWriter, r *http.Request) { |
| 20 | if !api.Authorize(r, policy.ActionRead, rbac.ResourceDeploymentConfig) { |
| 21 | httpapi.Forbidden(rw) |
| 22 | return |
| 23 | } |
| 24 | |
| 25 | values, err := api.DeploymentValues.WithoutSecrets() |
| 26 | if err != nil { |
| 27 | httpapi.InternalServerError(rw, err) |
| 28 | return |
| 29 | } |
| 30 | |
| 31 | httpapi.Write( |
| 32 | r.Context(), rw, http.StatusOK, |
| 33 | codersdk.DeploymentConfig{ |
| 34 | Values: values, |
| 35 | Options: api.DeploymentOptions, |
| 36 | }, |
| 37 | ) |
| 38 | } |
| 39 | |
| 40 | // @Summary Get deployment stats |
| 41 | // @ID get-deployment-stats |
nothing calls this directly
no test coverage detected