tango-app-api-audit 3.4.62 → 3.4.64
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/README.md +28 -28
- package/package.json +1 -1
- package/src/controllers/traxAudit.controllers.js +25 -16
package/README.md
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
# README #
|
|
2
|
-
|
|
3
|
-
This README would normally document whatever steps are necessary to get your application up and running.
|
|
4
|
-
|
|
5
|
-
### What is this repository for? ###
|
|
6
|
-
|
|
7
|
-
* Quick summary
|
|
8
|
-
* Version
|
|
9
|
-
* [Learn Markdown](https://bitbucket.org/tutorials/markdowndemo)
|
|
10
|
-
|
|
11
|
-
### How do I get set up? ###
|
|
12
|
-
|
|
13
|
-
* Summary of set up
|
|
14
|
-
* Configuration
|
|
15
|
-
* Dependencies
|
|
16
|
-
* Database configuration
|
|
17
|
-
* How to run tests
|
|
18
|
-
* Deployment instructions
|
|
19
|
-
|
|
20
|
-
### Contribution guidelines ###
|
|
21
|
-
|
|
22
|
-
* Writing tests
|
|
23
|
-
* Code review
|
|
24
|
-
* Other guidelines
|
|
25
|
-
|
|
26
|
-
### Who do I talk to? ###
|
|
27
|
-
|
|
28
|
-
* Repo owner or admin
|
|
1
|
+
# README #
|
|
2
|
+
|
|
3
|
+
This README would normally document whatever steps are necessary to get your application up and running.
|
|
4
|
+
|
|
5
|
+
### What is this repository for? ###
|
|
6
|
+
|
|
7
|
+
* Quick summary
|
|
8
|
+
* Version
|
|
9
|
+
* [Learn Markdown](https://bitbucket.org/tutorials/markdowndemo)
|
|
10
|
+
|
|
11
|
+
### How do I get set up? ###
|
|
12
|
+
|
|
13
|
+
* Summary of set up
|
|
14
|
+
* Configuration
|
|
15
|
+
* Dependencies
|
|
16
|
+
* Database configuration
|
|
17
|
+
* How to run tests
|
|
18
|
+
* Deployment instructions
|
|
19
|
+
|
|
20
|
+
### Contribution guidelines ###
|
|
21
|
+
|
|
22
|
+
* Writing tests
|
|
23
|
+
* Code review
|
|
24
|
+
* Other guidelines
|
|
25
|
+
|
|
26
|
+
### Who do I talk to? ###
|
|
27
|
+
|
|
28
|
+
* Repo owner or admin
|
|
29
29
|
* Other community or team contact
|
package/package.json
CHANGED
|
@@ -507,7 +507,6 @@ export async function getAuditFile( req, res ) {
|
|
|
507
507
|
const userDetails = await aggregateBinaryAudit( userQuery );
|
|
508
508
|
logger.info( { userDetails: userDetails, function: 'userDetails' } );
|
|
509
509
|
const auditStatus = userDetails && userDetails.length > 0 ? userDetails[0].auditStatus : null;
|
|
510
|
-
|
|
511
510
|
switch ( auditStatus ) {
|
|
512
511
|
case null:
|
|
513
512
|
|
|
@@ -523,6 +522,7 @@ export async function getAuditFile( req, res ) {
|
|
|
523
522
|
}
|
|
524
523
|
msg = JSON.parse( consumer );
|
|
525
524
|
|
|
525
|
+
|
|
526
526
|
break;
|
|
527
527
|
|
|
528
528
|
case 'inprogress':
|
|
@@ -580,6 +580,7 @@ export async function getAuditFile( req, res ) {
|
|
|
580
580
|
default:
|
|
581
581
|
return res.sendError( 'Please give valid moduleType', 400 );
|
|
582
582
|
}
|
|
583
|
+
|
|
583
584
|
const traxInfo = await findOneTraxAuditData( query );
|
|
584
585
|
if ( !traxInfo ) {
|
|
585
586
|
return res.sendError( 'The source record not found', 400 );
|
|
@@ -714,17 +715,17 @@ export async function getAuditFile( req, res ) {
|
|
|
714
715
|
} );
|
|
715
716
|
break;
|
|
716
717
|
case 'anomaly-audit':
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
718
|
+
const BucketCDN = url.traxAuditInput;
|
|
719
|
+
const data = `${BucketCDN}${ msg.path}`;
|
|
720
|
+
let files = [];
|
|
721
|
+
files.push(
|
|
722
|
+
data,
|
|
723
|
+
);
|
|
724
|
+
result.push( {
|
|
725
|
+
type: 'video',
|
|
726
|
+
file: files,
|
|
727
|
+
} );
|
|
728
|
+
|
|
728
729
|
break;
|
|
729
730
|
default:
|
|
730
731
|
return res.sendError( 'Please given valid moduleType', 400 );
|
|
@@ -1716,10 +1717,18 @@ export async function saveBinary( req, res ) {
|
|
|
1716
1717
|
Answer: inputData.answer,
|
|
1717
1718
|
configTime: getData?.sqs?.Body?.configTime,
|
|
1718
1719
|
inputBucketName: getData?.sqs?.Body?.inputBucketName,
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1720
|
+
entry_time: getData?.sqs?.Body?.entry_time,
|
|
1721
|
+
exit_time: getData?.sqs?.Body?.exit_time,
|
|
1722
|
+
address: getData?.sqs?.Body?.address,
|
|
1723
|
+
country: getData?.sqs?.Body?.country,
|
|
1724
|
+
state: getData?.sqs?.Body?.state,
|
|
1725
|
+
city: getData?.sqs?.Body?.city,
|
|
1726
|
+
pincode: getData?.sqs?.Body?.pincode,
|
|
1727
|
+
date_timestamp: getData?.sqs?.Body?.date_timestamp,
|
|
1728
|
+
timestamp: getData?.sqs?.Body?.timestamp,
|
|
1729
|
+
time_spend: getData?.sqs?.Body?.time_spend,
|
|
1730
|
+
temp_id: getData?.sqs?.Body?.temp_id,
|
|
1731
|
+
zone_name: getData?.sqs?.Body?.zone_name,
|
|
1723
1732
|
folderPath: getData?.sqs?.Body?.fileDetails[0]?.outputFilePath,
|
|
1724
1733
|
createdAt: new Date(),
|
|
1725
1734
|
};
|