Skip to content

Commit 05cc1a3

Browse files
refactor: update client import and variable naming in market-app.utils.ts
1 parent 8c4e12d commit 05cc1a3

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

api/src/utils/market-app.utils.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import contentstack from '@contentstack/marketplace-sdk';
1+
import {client} from '@contentstack/marketplace-sdk';
22
import { DEVURLS } from '../constants/index.js';
33

44

55

66

77
export const getAllApps = async ({ organizationUid, authtoken, region }: any) => {
88
try {
9-
const client = contentstack.client({ authtoken, host: DEVURLS?.[region] ?? DEVURLS?.NA });
10-
const data = await client.marketplace(organizationUid).findAllApps();
9+
const contentstackclient = client({ authtoken, host: DEVURLS?.[region] ?? DEVURLS?.NA });
10+
const data = await contentstackclient.marketplace(organizationUid).findAllApps();
1111
return data?.items;
1212
} catch (err) {
1313
console.info("🚀 ~ getAllApps ~ err:", err)
@@ -16,8 +16,8 @@ export const getAllApps = async ({ organizationUid, authtoken, region }: any) =>
1616

1717
export const getAppManifestAndAppConfig = async ({ organizationUid, authtoken, region, manifestUid }: any) => {
1818
try {
19-
const client = contentstack.client({ authtoken, host: DEVURLS?.[region] ?? DEVURLS?.NA });
20-
const data = await client.marketplace(organizationUid).app(manifestUid).fetch();
19+
const contentstackclient = client({ authtoken, host: DEVURLS?.[region] ?? DEVURLS?.NA });
20+
const data = await contentstackclient.marketplace(organizationUid).app(manifestUid).fetch();
2121
return data;
2222
} catch (err: any) {
2323
console.info("🚀 ~ getAppManifestAndAppConfig ~ err:", err)

0 commit comments

Comments
 (0)