Skip to content

Commit 845ceb0

Browse files
committed
use platform.FormData
1 parent d06698d commit 845ceb0

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @code.store/arcxp-sdk-ts
22

3+
## 5.1.5
4+
5+
### Patch Changes
6+
7+
- fix ArcSales, use platform
8+
39
## 5.1.4
410

511
### Patch Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@code.store/arcxp-sdk-ts",
3-
"version": "5.1.4",
3+
"version": "5.1.5",
44
"description": "A strongly typed set of ArcXP API's and utilities reduce the amount of work required to develop with ArcXP, starting with reducing the boilerplate code you have to write.",
55
"type": "module",
66
"main": "./dist/index.js",

src/api/sales/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import FormData from 'form-data';
1+
import platform from '../../lib/platform/index.js';
22
import { type ArcAPIOptions, ArcAbstractAPI } from '../abstract-api.js';
33
import type {
44
CreateEnterpriseGroupParams,
@@ -16,7 +16,9 @@ export class ArcSales extends ArcAbstractAPI {
1616
}
1717

1818
async migrate(params: MigrateBatchSubscriptionsParams, payload: MigrateBatchSubscriptionsPayload) {
19+
const FormData = await platform.form_data();
1920
const form = new FormData();
21+
2022
form.append('file', JSON.stringify(payload), { filename: 'subs.json', contentType: 'application/json' });
2123

2224
const { data } = await this.client.post<MigrateBatchSubscriptionsResponse>('/migrate', form, {

0 commit comments

Comments
 (0)