MCPcopy Index your code
hub / github.com/subquery/subql / createProject

Function createProject

packages/cli/src/controller/project-controller.ts:39–61  ·  view source on GitHub ↗
(
  url: string,
  authToken: string,
  body: CreateProject
)

Source from the content-addressed store, hash-verified

37}
38
39export async function createProject(
40 url: string,
41 authToken: string,
42 body: CreateProject
43): Promise<CreateProjectResponse> {
44 try {
45 const res = await axios<CreateProjectResponse>({
46 headers: {
47 Authorization: `Bearer ${authToken}`,
48 },
49 method: 'post',
50 url: 'subqueries',
51 baseURL: url,
52 data: {
53 gitRepository: '', // Deprecated
54 ...body,
55 },
56 });
57 return res.data as unknown as CreateProjectResponse;
58 } catch (e) {
59 throw errorHandle(e, 'Failed to create project:');
60 }
61}
62
63export async function deleteProject(
64 authToken: string,

Callers 5

createProjectAdapterFunction · 0.90
registerAppFunction · 0.85
createParentProjectFunction · 0.85

Calls 1

errorHandleFunction · 0.90

Tested by

no test coverage detected