MCPcopy Index your code
hub / github.com/coder/coder / createTemplateFn

Function createTemplateFn

site/src/api/queries/templates.ts:236–247  ·  view source on GitHub ↗
(options: CreateTemplateOptions)

Source from the content-addressed store, hash-verified

234};
235
236const createTemplateFn = async (options: CreateTemplateOptions) => {
237 const version = await API.createTemplateVersion(
238 options.organization,
239 options.version,
240 );
241 options.onCreateVersion?.(version);
242 await waitBuildToBeFinished(version, options.onTemplateVersionChanges);
243 return API.createTemplate(options.organization, {
244 ...options.template,
245 template_version_id: version.id,
246 });
247};
248
249export const templateVersionLogs = (versionId: string) => {
250 return {

Callers

nothing calls this directly

Calls 2

waitBuildToBeFinishedFunction · 0.85
createTemplateVersionMethod · 0.45

Tested by

no test coverage detected