tango-app-api-report 3.0.16-dev → 3.1.2
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tango-app-api-report",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.2",
|
|
4
4
|
"description": "report",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"nodemailer": "^6.9.13",
|
|
26
26
|
"nodemon": "^3.1.0",
|
|
27
27
|
"swagger-ui-express": "^5.0.0",
|
|
28
|
-
"tango-api-schema": "^2.0.
|
|
29
|
-
"tango-app-api-middleware": "^1.
|
|
28
|
+
"tango-api-schema": "^2.0.111",
|
|
29
|
+
"tango-app-api-middleware": "^3.1.13",
|
|
30
30
|
"winston": "^3.12.0",
|
|
31
31
|
"winston-daily-rotate-file": "^5.0.0"
|
|
32
32
|
},
|
|
@@ -282,7 +282,7 @@ export async function uploadManualReport( req, res ) {
|
|
|
282
282
|
logger.info( { files: req.files } );
|
|
283
283
|
const uploadDataParams = {
|
|
284
284
|
Bucket: appConfig.cloud.aws.bucket.reportBucket,
|
|
285
|
-
Key:
|
|
285
|
+
Key: `${inputData.fileDate}/${req.report?.reportConfigs?.reportName}/`,
|
|
286
286
|
fileName: inputData.fileName,
|
|
287
287
|
body: req.files.files.data,
|
|
288
288
|
};
|
|
@@ -324,7 +324,7 @@ export async function getReportList( req, res ) {
|
|
|
324
324
|
const inputData = req.query;
|
|
325
325
|
const fetchData = {
|
|
326
326
|
Bucket: appConfig.cloud.aws.bucket.reportBucket,
|
|
327
|
-
file_path:
|
|
327
|
+
file_path: `${inputData.fileDate}/${req.report?.reportConfigs?.reportName}/`,
|
|
328
328
|
};
|
|
329
329
|
const folderPath = await listFileByPath( fetchData );
|
|
330
330
|
|
|
@@ -385,7 +385,7 @@ export async function sendReport( req, res ) {
|
|
|
385
385
|
for ( const data of getReportList ) {
|
|
386
386
|
const fetchData = {
|
|
387
387
|
Bucket: appConfig.cloud.aws.bucket.reportBucket,
|
|
388
|
-
Key:
|
|
388
|
+
Key: `${inputData.fileDate}/${req.report?.reportConfigs?.reportName}/${inputData.fileDate}_${data.fileName}.${data.fileType}`,
|
|
389
389
|
};
|
|
390
390
|
reportName.push( `${inputData.fileDate}_${data.fileName}` );
|
|
391
391
|
name.push( `${data.fileName}` );
|
|
@@ -22,7 +22,7 @@ export async function isFolderExist( req, res, next ) {
|
|
|
22
22
|
const inputData = req.query;
|
|
23
23
|
const fetchData = {
|
|
24
24
|
Bucket: appConfig.cloud.aws.bucket.reportBucket,
|
|
25
|
-
Key:
|
|
25
|
+
Key: `${inputData.fileDate}/${req.report?.reportConfigs?.reportName}/`,
|
|
26
26
|
};
|
|
27
27
|
logger.info( { fetchData: fetchData, report: req.report?.reportConfigs?.reportName } );
|
|
28
28
|
const isExist = await checkFileExist( fetchData );
|