Returns a single template. @Summary Get template settings by ID @ID get-template-settings-by-id @Security CoderSessionToken @Produce json @Tags Templates @Param template path string true "Template ID" format(uuid) @Success 200 {object} codersdk.Template @Router /api/v2/templates/{template} [get]
(rw http.ResponseWriter, r *http.Request)
| 48 | // @Success 200 {object} codersdk.Template |
| 49 | // @Router /api/v2/templates/{template} [get] |
| 50 | func (api *API) template(rw http.ResponseWriter, r *http.Request) { |
| 51 | ctx := r.Context() |
| 52 | template := httpmw.TemplateParam(r) |
| 53 | |
| 54 | httpapi.Write(ctx, rw, http.StatusOK, api.convertTemplate(template)) |
| 55 | } |
| 56 | |
| 57 | // @Summary Delete template by ID |
| 58 | // @ID delete-template-by-id |
nothing calls this directly
no test coverage detected