MCPcopy
hub / github.com/subquery/subql / fetchTemplates

Function fetchTemplates

packages/cli/src/controller/init-controller.ts:67–75  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

65// GET /all
66// https://templates.subquery.network/all
67export async function fetchTemplates(): Promise<Template[]> {
68 try {
69 const res = await axiosInstance.get<{templates: Template[]}>('/all');
70
71 return res.data.templates;
72 } catch (e) {
73 throw errorHandle(e, `Update to reach endpoint '${BASE_TEMPLATE_URl}/all`);
74 }
75}
76
77// GET /networks
78// https://templates.subquery.network/networks

Callers 1

Calls 1

errorHandleFunction · 0.90

Tested by

no test coverage detected