From 814ecf5003593f45bcf8199df7f6c27128e0b2a3 Mon Sep 17 00:00:00 2001 From: AlexCXC <1223408988@qq.com> Date: Fri, 6 Jan 2023 18:25:50 +0800 Subject: [PATCH] import common dataset add to_archive param --- src/dtable-web-api.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/dtable-web-api.js b/src/dtable-web-api.js index c3138ffc..26ce5850 100644 --- a/src/dtable-web-api.js +++ b/src/dtable-web-api.js @@ -2216,10 +2216,13 @@ class DTableWebAPI { return this.req.delete(url); } - importCommonDataset(datasetId, dst_dtable_uuid) { + importCommonDataset(datasetId, dst_dtable_uuid, toArchive) { let url = this.server + '/api/v2.1/dtable/common-datasets/' + datasetId + '/import/'; let formData = new FormData(); formData.append('dst_dtable_uuid', dst_dtable_uuid); + if (toArchive) { + formData.append('to_archive', toArchive); + } return this._sendPostRequest(url, formData); }