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

Function projectsInfo

packages/cli/src/controller/deploy-controller.ts:117–134  ·  view source on GitHub ↗
(
  authToken: string,
  org: string,
  projectName: string,
  url: string,
  type: string
)

Source from the content-addressed store, hash-verified

115}
116
117export async function projectsInfo(
118 authToken: string,
119 org: string,
120 projectName: string,
121 url: string,
122 type: string
123): Promise<ProjectDataType | undefined> {
124 const key = `${org}/${projectName.toLowerCase()}`;
125 try {
126 const res = await getAxiosInstance(url, authToken).get<ProjectDataType[]>(
127 `v3/subqueries/${buildProjectKey(org, projectName)}/deployments`
128 );
129
130 return res.data.find((element) => element.projectKey === `${key}` && element.type === type);
131 } catch (e) {
132 throw errorHandle(e, 'Failed to get projects:');
133 }
134}
135
136export async function updateDeployment(
137 org: string,

Calls 4

buildProjectKeyFunction · 0.90
errorHandleFunction · 0.90
getAxiosInstanceFunction · 0.85
findMethod · 0.65

Tested by

no test coverage detected