Skip to content

Commit

Permalink
optimise params
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael18811380328 committed Apr 4, 2023
1 parent 92398b8 commit 4a7a587
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/dtable-web-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ class DTableWebAPI {
if (dst_parent_folder) {
form.append('dst_parent_folder', dst_parent_folder);
}
return this._sendPostRequest(url, form);
return this._sendPostRequest(url, form, {headers: {'Content-Type': 'application/json'}});
}

renameTable(workspaceID, old_name, new_name) {
Expand Down Expand Up @@ -264,9 +264,10 @@ class DTableWebAPI {

deleteTable(workspaceID, name, src_parent_folder) {
const url = this.server + '/api/v2.1/workspace/' + workspaceID + '/dtable/';
let form = new FormData();
form.append('name', name);
form.append('src_parent_folder', src_parent_folder);
let params = {
name: name,
src_parent_folder: src_parent_folder,
};
return this.req.delete(url, { data: params });
}

Expand Down

0 comments on commit 4a7a587

Please sign in to comment.