tango-app-api-audit 3.5.36 → 3.5.37
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 +42 -45
- package/src/controllers/eyeTestAudit.controllers.js +5 -14
- package/build.js +0 -25
- package/config.zip +0 -0
package/package.json
CHANGED
|
@@ -1,45 +1,42 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"eslint-plugin-promise": "^6.2.0"
|
|
44
|
-
}
|
|
45
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "tango-app-api-audit",
|
|
3
|
+
"version": "3.5.37",
|
|
4
|
+
"description": "audit & audit metrics apis",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"start": "nodemon --exec \"eslint --fix . && node app.js\""
|
|
9
|
+
},
|
|
10
|
+
"engines": {
|
|
11
|
+
"node": ">=18.10.0"
|
|
12
|
+
},
|
|
13
|
+
"author": "praveenraj",
|
|
14
|
+
"license": "ISC",
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"adm-zip": "^0.5.15",
|
|
17
|
+
"aws-sdk": "^2.1643.0",
|
|
18
|
+
"axios": "^1.7.9",
|
|
19
|
+
"dayjs": "^1.11.11",
|
|
20
|
+
"dotenv": "^16.4.5",
|
|
21
|
+
"express": "^4.19.2",
|
|
22
|
+
"form-data": "^4.0.1",
|
|
23
|
+
"handlebars": "^4.7.8",
|
|
24
|
+
"joi-to-swagger": "^6.2.0",
|
|
25
|
+
"lodash": "^4.17.21",
|
|
26
|
+
"mongodb": "^6.7.0",
|
|
27
|
+
"nodemon": "^3.1.3",
|
|
28
|
+
"swagger-ui-express": "^5.0.1",
|
|
29
|
+
"tango-api-schema": "^2.3.28",
|
|
30
|
+
"tango-app-api-middleware": "^3.4.4",
|
|
31
|
+
"winston": "^3.13.0",
|
|
32
|
+
"winston-daily-rotate-file": "^5.0.0"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"eslint": "^8.57.0",
|
|
36
|
+
"eslint-config-google": "^0.14.0",
|
|
37
|
+
"eslint-config-semistandard": "^17.0.0",
|
|
38
|
+
"eslint-config-standard": "^17.1.0",
|
|
39
|
+
"eslint-plugin-import": "^2.29.1",
|
|
40
|
+
"eslint-plugin-promise": "^6.2.0"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getOpenSearchData, getOpenSearchById, logger, insertOpenSearchData, updateOpenSearchData, download, chunkArray, getOpenSearchCount, insertWithId } from 'tango-app-api-middleware';
|
|
2
|
-
import { findOneUser } from '../service/user.service.js';
|
|
2
|
+
import { findOneUser, findUser } from '../service/user.service.js';
|
|
3
3
|
import mongoose from 'mongoose';
|
|
4
4
|
import dayjs from 'dayjs';
|
|
5
5
|
import utc from 'dayjs/plugin/utc.js';
|
|
@@ -1635,7 +1635,6 @@ export async function summaryList( req, res ) {
|
|
|
1635
1635
|
temp[i].date = dayjs( item?._source?.date ).format( 'D MMM, YYYY' );
|
|
1636
1636
|
temp[i].RMName = RMName;
|
|
1637
1637
|
temp[i].clusterName =clusterName;
|
|
1638
|
-
temp[i]._id = item?._id;
|
|
1639
1638
|
}
|
|
1640
1639
|
logger.info( { temp: temp } );
|
|
1641
1640
|
}
|
|
@@ -1994,7 +1993,7 @@ export async function emailAlertLog( req, res ) {
|
|
|
1994
1993
|
|
|
1995
1994
|
|
|
1996
1995
|
logger.info( { inputData: inputData, getData: response } );
|
|
1997
|
-
return res.sendSuccess( { result: response
|
|
1996
|
+
return res.sendSuccess( { result: response } );
|
|
1998
1997
|
} catch ( error ) {
|
|
1999
1998
|
const err = error.message || 'Internal Server Error';
|
|
2000
1999
|
logger.error( { message: error, data: req.body, function: 'eyetestAudit-controller-emailAlertLog' } );
|
|
@@ -2101,23 +2100,15 @@ export async function clusterList( req, res ) {
|
|
|
2101
2100
|
],
|
|
2102
2101
|
},
|
|
2103
2102
|
},
|
|
2104
|
-
{
|
|
2105
|
-
$group: {
|
|
2106
|
-
_id: null,
|
|
2107
|
-
clientId: { $first: '$clientId' },
|
|
2108
|
-
clusterList: { $addToSet: '$clusterName' },
|
|
2109
|
-
},
|
|
2110
|
-
},
|
|
2111
2103
|
{
|
|
2112
2104
|
$project: {
|
|
2113
|
-
_id:
|
|
2105
|
+
_id: 1,
|
|
2114
2106
|
clientId: 1,
|
|
2115
|
-
|
|
2107
|
+
clusterName: 1,
|
|
2116
2108
|
},
|
|
2117
2109
|
},
|
|
2118
2110
|
];
|
|
2119
2111
|
const getClusterList = await aggregateClusters( query );
|
|
2120
|
-
logger.info( { getClusterList: getClusterList, query: query } );
|
|
2121
2112
|
return res.sendSuccess( { result: getClusterList || [] } );
|
|
2122
2113
|
} catch ( error ) {
|
|
2123
2114
|
const err = error.message || 'Internal Server Error';
|
|
@@ -2140,7 +2131,7 @@ export async function rmList( req, res ) {
|
|
|
2140
2131
|
const emailList = getRMList.userList.map( ( item ) => item.email )||
|
|
2141
2132
|
[];
|
|
2142
2133
|
logger.info( { emailList: emailList } );
|
|
2143
|
-
temp = await
|
|
2134
|
+
temp = await findUser( { email: { $in: emailList }, role: 'admin', isActive: true }, { userName: 1, email: 1, _id: 1, role: 1 } );
|
|
2144
2135
|
return res.sendSuccess( { result: temp } );
|
|
2145
2136
|
} else {
|
|
2146
2137
|
return res.sendSuccess( { result: temp } );
|
package/build.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// build.js
|
|
2
|
-
import fs from 'fs';
|
|
3
|
-
|
|
4
|
-
const type = process.argv[2] || 'patch'; // default to patch
|
|
5
|
-
const file = 'package.json';
|
|
6
|
-
|
|
7
|
-
// Read and parse package.json
|
|
8
|
-
const pkg = JSON.parse( fs.readFileSync( file, 'utf8' ) );
|
|
9
|
-
|
|
10
|
-
// Force "main" to be "index.js"
|
|
11
|
-
pkg.main = 'index.js';
|
|
12
|
-
|
|
13
|
-
// Bump version
|
|
14
|
-
const [ major, minor, patch ] = pkg.version.split( '.' ).map( Number );
|
|
15
|
-
|
|
16
|
-
if ( type === 'patch' ) pkg.version = `${major}.${minor}.${patch + 1}`;
|
|
17
|
-
else if ( type === 'minor' ) pkg.version = `${major}.${minor + 1}.0`;
|
|
18
|
-
else if ( type === 'major' ) pkg.version = `${major + 1}.0.0`;
|
|
19
|
-
else throw new Error( 'Invalid version type. Use patch, minor, or major.' );
|
|
20
|
-
|
|
21
|
-
// Write back to package.json
|
|
22
|
-
fs.writeFileSync( file, JSON.stringify( pkg, null, 2 ) );
|
|
23
|
-
|
|
24
|
-
// console.log( `🔧 Updated version to ${pkg.version} and set "main": "index.js"` );
|
|
25
|
-
|
package/config.zip
DELETED
|
Binary file
|