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

Function updateDeployment

packages/cli/src/controller/deploy-controller.ts:136–160  ·  view source on GitHub ↗
(
  org: string,
  projectName: string,
  deployID: number,
  authToken: string,
  ipfsCID: string,
  queryVersion: string,
  query: QueryAdvancedOpts,
  chains: V3DeploymentIndexerType[],
  url: string
)

Source from the content-addressed store, hash-verified

134}
135
136export async function updateDeployment(
137 org: string,
138 projectName: string,
139 deployID: number,
140 authToken: string,
141 ipfsCID: string,
142 queryVersion: string,
143 query: QueryAdvancedOpts,
144 chains: V3DeploymentIndexerType[],
145 url: string
146): Promise<void> {
147 try {
148 await getAxiosInstance(url, authToken).put(
149 `v3/subqueries/${buildProjectKey(org, projectName)}/deployments/${deployID}`,
150 {
151 cid: ipfsCID,
152 queryImageVersion: queryVersion,
153 queryAdvancedSettings: {query},
154 chains,
155 } as V3DeploymentInput
156 );
157 } catch (e) {
158 throw errorHandle(e, `Failed to redeploy project: ${(e as any).message}`);
159 }
160}
161
162export async function ipfsCID_validate(
163 cid: string | undefined,

Callers 2

executeProjectDeploymentFunction · 0.85

Calls 4

buildProjectKeyFunction · 0.90
errorHandleFunction · 0.90
getAxiosInstanceFunction · 0.85
putMethod · 0.45

Tested by

no test coverage detected