tango-app-api-audit 3.4.68-beta.5 → 3.4.68-beta.6

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/.eslintrc.cjs CHANGED
@@ -36,7 +36,7 @@ module.exports = {
36
36
  'no-unused-vars': 'error',
37
37
  'new-cap': [ 'error', { 'newIsCap': true, 'capIsNew': false } ],
38
38
  'prefer-const': 'off',
39
- 'no-console': 'error',
39
+ // 'no-console': 'error',
40
40
  },
41
41
  };
42
42
 
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/app.js ADDED
@@ -0,0 +1,47 @@
1
+ import express from 'express';
2
+ import dotenv from 'dotenv';
3
+ import { logger } from 'tango-app-api-middleware';
4
+ import { connectdb } from './config/database/database.js';
5
+ import responseMiddleware from './config/response/response.js';
6
+ import errorMiddleware from './config/response/error.js';
7
+ import pkg from 'body-parser';
8
+ import { swaggerConfig } from './config/swagger/swagger.js';
9
+ import swagger from 'swagger-ui-express';
10
+ import traxAuditRouter from './src/routes/traxAudit.routes.js';
11
+ import auditWalletRouter from './src/routes/auditWallet.routes.js';
12
+ import auditRouter from './src/routes/audit.routes.js';
13
+ import cors from 'cors';
14
+ import eyeTestAuditRouter from './src/routes/eyeTestAudit.routes.js';
15
+
16
+ const { json, urlencoded } = pkg;
17
+ const env=dotenv.config();
18
+
19
+ const app = express();
20
+ const PORT = process.env.PORT || 3000;
21
+
22
+
23
+ app.use( json( { limit: '500mb' } ) );
24
+ app.use(
25
+ urlencoded( {
26
+ extended: true,
27
+ } ),
28
+ );
29
+ app.use( cors() );
30
+ app.use( responseMiddleware );
31
+ app.use( errorMiddleware );
32
+
33
+ if ( env.error ) {
34
+ logger.error( '.env not found' );
35
+ process.exit( 1 );
36
+ }
37
+ app.use( '/api-docs', swagger.serve, swagger.setup( swaggerConfig ) );
38
+
39
+ app.use( '/v3/audit', auditRouter );
40
+ app.use( '/v3/trax-audit', traxAuditRouter );
41
+ app.use( '/v3/audit-wallet', auditWalletRouter );
42
+ app.use( '/v3/eye-test-audit', eyeTestAuditRouter );
43
+
44
+ app.listen( PORT, () => {
45
+ logger.info( `server is running on port= ${PORT} ` );
46
+ connectdb();
47
+ } );
package/config.zip ADDED
Binary file
package/package.json CHANGED
@@ -1,42 +1,42 @@
1
- {
2
- "name": "tango-app-api-audit",
3
- "version": "3.4.68-beta.5",
4
- "description": "audit & audit metrics apis",
5
- "main": "index.js",
6
- "type": "module",
7
- "scripts": {
8
- "start": "nodemon --exec \"eslint --fix . && node index.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.2.95",
30
- "tango-app-api-middleware": "^3.1.71",
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
+ {
2
+ "name": "tango-app-api-audit",
3
+ "version": "3.4.68-beta.6",
4
+ "description": "audit & audit metrics apis",
5
+ "main": "app.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.2.95",
30
+ "tango-app-api-middleware": "^3.1.71",
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
+ }
@@ -16,7 +16,7 @@ export async function getList( req, res ) {
16
16
  const limit = inputData.limit || 10;
17
17
  const offset = inputData.offset ? ( inputData.offset - 1 ) * limit : 0;
18
18
 
19
- const sortBy = `${inputData?.sortBy}.keyword`;
19
+ const sortBy = inputData?.sortBy ? `${inputData.sortBy}.keyword` : 'storeName.keyword';
20
20
  const order = inputData?.sortOrder || -1;
21
21
  let filter= [
22
22
  {