@@ -440,7 +440,7 @@ WOQLClient.prototype.updateCSV = function(csv, commitMsg, gtype, gid) {
440440 let commit = this . generateCommitInfo ( commitMsg )
441441 const formData = new FormData ( ) ;
442442 csv . map ( ( item ) => {
443- formData . append ( item . name , item )
443+ formData . append ( item . fileToBeUpdated , item . updateWith )
444444 } )
445445 formData . append ( 'payload' , JSON . stringify ( commit ) )
446446 return this . dispatch (
@@ -486,12 +486,15 @@ WOQLClient.prototype.getCSV = function(csvName, download, gtype, gid) {
486486 * @param {string } gid TerminusDB Graph ID to update, main is the default value
487487 * @return {Promise } An API success message
488488 */
489- WOQLClient . prototype . deleteCSV = function ( csvName , gtype , gid ) {
490- let options = { } , filePath
491- options . name = csvName ;
492- return this . dispatch ( CONST . DELETE_CSV , this . connectionConfig . csvURL ( gtype , gid ) , options ) . then ( results => {
489+ WOQLClient . prototype . deleteCSV = function ( csvName , commitMsg , gtype , gid ) {
490+ if ( commitMsg && csv ) {
491+ let commit = this . generateCommitInfo ( commitMsg )
492+ let options = { } , filePath
493+ options . name = csvName ;
494+ return this . dispatch ( CONST . DELETE_CSV , this . connectionConfig . csvURL ( gtype , gid ) , options ) . then ( results => {
493495 return results ;
494496 } )
497+ }
495498 }
496499
497500/**
0 commit comments