tango-app-api-report 3.0.6-dev → 3.0.7-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -256,7 +256,7 @@ export async function uploadManualReport( req, res ) {
|
|
|
256
256
|
Bucket: appConfig.cloud.aws.bucket.reportBucket,
|
|
257
257
|
Key: `reports/${inputData.fileDate}/${data.reportName}/`,
|
|
258
258
|
fileName: inputData.fileName,
|
|
259
|
-
Body: req.files,
|
|
259
|
+
Body: req.files.files.data,
|
|
260
260
|
};
|
|
261
261
|
const result = await fileUpload( uploadDataParams );
|
|
262
262
|
logger.info( { result: result, value: 'file upload response' } );
|
|
@@ -392,7 +392,7 @@ export async function sendReport( req, res ) {
|
|
|
392
392
|
} );
|
|
393
393
|
} );
|
|
394
394
|
if ( sendMailCount == getReportList.length ) {
|
|
395
|
-
return res.sendError( 'File not available in bucket',
|
|
395
|
+
return res.sendError( 'File not available in bucket', 204 );
|
|
396
396
|
}
|
|
397
397
|
let user = await findOneUser( { _id: req.user._id, isActive: true } );
|
|
398
398
|
if ( !user ) {
|
|
@@ -423,7 +423,8 @@ export async function sendReport( req, res ) {
|
|
|
423
423
|
clientId: getReportList[0].clientId,
|
|
424
424
|
},
|
|
425
425
|
};
|
|
426
|
-
|
|
426
|
+
logger.info( { log: log } );
|
|
427
|
+
// await insertOpenSearchData( 'tango-retail-activity-logs', log );
|
|
427
428
|
return res.sendSuccess( { result: 'Report has been Sent Successfully' } );
|
|
428
429
|
} else {
|
|
429
430
|
return res.sendError( ' Message does not Sent & Report has been Sent Successfully', 500 );
|