@edraj/tsdmart 4.0.3 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dmart.model.ts +1 -0
- package/dmart.service.ts +6 -2
- package/package.json +1 -1
package/dmart.model.ts
CHANGED
package/dmart.service.ts
CHANGED
|
@@ -303,7 +303,7 @@ export class Dmart {
|
|
|
303
303
|
) {
|
|
304
304
|
try {
|
|
305
305
|
let csvUrl = `/managed/resources_from_csv/${request.resourceType}/${request.space_name}/${request.subpath}`;
|
|
306
|
-
|
|
306
|
+
const params: any = {};
|
|
307
307
|
if (request.schema) {
|
|
308
308
|
csvUrl += `/${request.schema}`;
|
|
309
309
|
}
|
|
@@ -311,12 +311,16 @@ export class Dmart {
|
|
|
311
311
|
let formdata = new FormData();
|
|
312
312
|
formdata.append("resources_file", request.payload);
|
|
313
313
|
|
|
314
|
+
if(request.isUpdate){
|
|
315
|
+
params['is_update'] = request.isUpdate;
|
|
316
|
+
}
|
|
317
|
+
|
|
314
318
|
const headers = {"Content-Type": "multipart/form-data"};
|
|
315
319
|
|
|
316
320
|
const {data} = await Dmart.axiosDmartInstance.post<ApiResponse>(
|
|
317
321
|
csvUrl,
|
|
318
322
|
formdata,
|
|
319
|
-
{headers}
|
|
323
|
+
{headers, params}
|
|
320
324
|
);
|
|
321
325
|
|
|
322
326
|
return data;
|