Skip to content
This repository was archived by the owner on Apr 7, 2023. It is now read-only.

Commit 9605a9f

Browse files
jarndt-ltmGitHub Enterprise
authored andcommitted
the resource path has changed (#4)
1 parent c389c14 commit 9605a9f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/commands/1commerce/import/products.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ import { singleRecordQuery } from '../../../shared/queries';
1111

1212
const TOPIC = '1commerce';
1313
const CMD = `${TOPIC}:import:products`;
14-
const DEFAULT_PATH = '/commerce/webstores/import';
14+
const WEBSTORE_ID = '${WEBSTORE_ID}'
15+
const DEFAULT_PATH = `commerce/management/webstores/${WEBSTORE_ID}/product-import`;
1516

1617
Messages.importMessagesDirectory(__dirname);
1718
const messages = Messages.loadMessages('@salesforce/plugin-1commerce', TOPIC);
@@ -64,10 +65,9 @@ export class ImportProducts extends SfdxCommand {
6465

6566
const importProductsResults = await conn.request({
6667
method: 'POST',
67-
url: `${conn.baseUrl()}${DEFAULT_PATH}`,
68+
url: `${conn.baseUrl()}/${DEFAULT_PATH.replace(WEBSTORE_ID,webStoreId)}`,
6869
body: `{
69-
"contentVersionId": "${this.flags.contentversionid}",
70-
"webstoreId": "${webStoreId}"
70+
"contentVersionId": "${this.flags.contentversionid}"
7171
}`,
7272
headers: {
7373
key: 'Content-Type',

0 commit comments

Comments
 (0)