@Summary List provisioner key @ID list-provisioner-key @Security CoderSessionToken @Produce json @Tags Enterprise @Param organization path string true "Organization ID" @Success 200 {object} []codersdk.ProvisionerKey @Router /api/v2/organizations/{organization}/provisionerkeys [get]
(rw http.ResponseWriter, r *http.Request)
| 106 | // @Success 200 {object} []codersdk.ProvisionerKey |
| 107 | // @Router /api/v2/organizations/{organization}/provisionerkeys [get] |
| 108 | func (api *API) provisionerKeys(rw http.ResponseWriter, r *http.Request) { |
| 109 | ctx := r.Context() |
| 110 | organization := httpmw.OrganizationParam(r) |
| 111 | |
| 112 | pks, err := api.Database.ListProvisionerKeysByOrganizationExcludeReserved(ctx, organization.ID) |
| 113 | if err != nil { |
| 114 | httpapi.InternalServerError(rw, err) |
| 115 | return |
| 116 | } |
| 117 | |
| 118 | httpapi.Write(ctx, rw, http.StatusOK, convertProvisionerKeys(pks)) |
| 119 | } |
| 120 | |
| 121 | // @Summary List provisioner key daemons |
| 122 | // @ID list-provisioner-key-daemons |
nothing calls this directly
no test coverage detected