Skip to content

Commit f5d45d0

Browse files
author
naman-contentstack
committed
used marketplaceSDK to update the app
1 parent 5f26db2 commit f5d45d0

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/commands/app/deploy.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import { Flags, FlagInput } from "@contentstack/cli-utilities";
2-
import { GraphqlApiClient, Launch, config, ApolloClient } from "@contentstack/cli-launch";
3-
2+
import {
3+
GraphqlApiClient,
4+
Launch,
5+
config,
6+
ApolloClient,
7+
} from "@contentstack/cli-launch";
48

59
import { LaunchProjectRes, UpdateHostingParams } from "../../types";
610
import { commonMsg, deployAppMsg } from "../../messages";
@@ -105,7 +109,7 @@ export default class Deploy extends AppCLIBaseCommand {
105109
flags,
106110
this.sharedConfig.org,
107111
{
108-
managementSdk: this.managementAppSdk,
112+
marketplaceSdk: this.marketplaceAppSdk,
109113
log: this.log,
110114
},
111115
updateHostingPayload

src/util/common-utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,16 +278,16 @@ const sanitizePath = (str: string) =>
278278
async function updateApp(
279279
flags: FlagInput,
280280
orgUid: string,
281-
options: CommonOptions,
281+
options: MarketPlaceOptions,
282282
updateReqPayload: UpdateHostingParams
283283
) {
284-
const { managementSdk } = options;
284+
const { marketplaceSdk } = options;
285285
const appUid: any = flags["app-uid"];
286286
const payload = {
287287
uid: appUid,
288288
hosting: updateReqPayload,
289289
};
290-
let app = managementSdk.organization(orgUid).app(appUid as string);
290+
let app = marketplaceSdk.marketplace(orgUid).app(appUid as string);
291291
app = Object.assign(app, payload);
292292
await app.update();
293293
}

0 commit comments

Comments
 (0)