File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -246,12 +246,15 @@ Afip.prototype.CreateServiceTA = async function(service) {
246
246
// Parse loginCmsReturn to JSON
247
247
const res = await xmlParser . parseStringPromise ( loginCmsResult . loginCmsReturn ) ;
248
248
249
- // Token authorization file name
250
- const taFileName = `TA-${ this . options [ 'CUIT' ] } -${ service } ${ this . options [ 'production' ] ? '-production' : '' } .json` ;
251
-
249
+ // Declare token authorization file path
250
+ const taFilePath = path . resolve (
251
+ this . TA_FOLDER ,
252
+ `TA-${ this . options [ 'CUIT' ] } -${ service } ${ this . options [ 'production' ] ? '-production' : '' } .json`
253
+ ) ;
254
+
252
255
// Save Token authorization data to json file
253
256
await ( new Promise ( ( resolve , reject ) => {
254
- fs . writeFile ( taFileName , JSON . stringify ( res . loginticketresponse ) , ( err ) => {
257
+ fs . writeFile ( taFilePath , JSON . stringify ( res . loginticketresponse ) , ( err ) => {
255
258
if ( err ) { reject ( err ) ; return ; }
256
259
resolve ( ) ;
257
260
} ) ;
You can’t perform that action at this time.
0 commit comments