Skip to content

Commit eede3d3

Browse files
committed
fixing delete csv
1 parent 7d8db35 commit eede3d3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/woqlClient.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -487,11 +487,13 @@ WOQLClient.prototype.getCSV = function(csvName, download, gtype, gid) {
487487
* @return {Promise} An API success message
488488
*/
489489
WOQLClient.prototype.deleteCSV = function(csvName, commitMsg, gtype, gid) {
490-
if (commitMsg && csv) {
490+
if (commitMsg && csvName) {
491491
let commit = this.generateCommitInfo(commitMsg)
492492
let options = {}, filePath
493-
options.name=csvName;
494-
return this.dispatch(CONST.DELETE_CSV, this.connectionConfig.csvURL(gtype, gid), options).then(results => {
493+
const formData = new FormData();
494+
formData.append('payload', "name="+csvName)
495+
formData.append('payload', JSON.stringify(commit))
496+
return this.dispatch(CONST.DELETE_CSV, this.connectionConfig.csvURL(gtype, gid), formData).then(results => {
495497
return results;
496498
})
497499
}

0 commit comments

Comments
 (0)