tango-app-api-client 3.3.2-beta.4 → 3.3.2-beta.5
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-client",
|
|
3
|
-
"version": "3.3.2-beta.
|
|
3
|
+
"version": "3.3.2-beta.5",
|
|
4
4
|
"description": "client",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -19,13 +19,15 @@
|
|
|
19
19
|
"express": "^4.18.2",
|
|
20
20
|
"express-fileupload": "^1.4.3",
|
|
21
21
|
"handlebars": "^4.7.8",
|
|
22
|
+
"i": "^0.3.7",
|
|
22
23
|
"joi": "^17.12.1",
|
|
23
24
|
"joi-to-swagger": "^6.2.0",
|
|
24
25
|
"lodash": "^4.17.21",
|
|
25
26
|
"mongodb": "^6.3.0",
|
|
26
27
|
"nodemon": "^3.0.3",
|
|
28
|
+
"npm": "^10.9.1",
|
|
27
29
|
"swagger-ui-express": "^5.0.0",
|
|
28
|
-
"tango-api-schema": "^2.1.
|
|
30
|
+
"tango-api-schema": "^2.1.85",
|
|
29
31
|
"tango-app-api-middleware": "^3.1.43-alpha.8",
|
|
30
32
|
"winston": "^3.11.0",
|
|
31
33
|
"winston-daily-rotate-file": "^5.0.0"
|
|
@@ -14,7 +14,7 @@ import { countDocumentsGroup, createGroupModel, findOneGroup } from '../service/
|
|
|
14
14
|
// import { deleteOneAuthentication } from '../service/authentication.service.js';
|
|
15
15
|
import { createBilling } from '../service/billing.service.js';
|
|
16
16
|
import { createPaymentAccount } from '../service/paymentAccount.service.js';
|
|
17
|
-
import { countDocumentsClusters } from '../service/cluster.service.js';
|
|
17
|
+
import { countDocumentsClusters, createclusterModel } from '../service/cluster.service.js';
|
|
18
18
|
import { countDocumentsTeams } from '../service/teams.service.js';
|
|
19
19
|
|
|
20
20
|
export async function create( req, res ) {
|
|
@@ -131,6 +131,17 @@ export async function create( req, res ) {
|
|
|
131
131
|
|
|
132
132
|
await createPaymentAccount( paymentAccount );
|
|
133
133
|
|
|
134
|
+
const defaultcluster = {
|
|
135
|
+
'clusterName': 'All stores',
|
|
136
|
+
'description': 'Contains all the onboarded stores',
|
|
137
|
+
'stores': [],
|
|
138
|
+
'Teamlead': [],
|
|
139
|
+
'clientId': insertedClientRecord.clientId,
|
|
140
|
+
'isDefaults': true,
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
await createclusterModel( defaultcluster );
|
|
144
|
+
|
|
134
145
|
|
|
135
146
|
const defaultGroup = {
|
|
136
147
|
'groupName': 'All stores',
|
|
@@ -661,7 +672,7 @@ export async function detailedAllClientCount( req, res ) {
|
|
|
661
672
|
if ( result.length == 0 ) {
|
|
662
673
|
return res.sendError( 'No Data Found', 204 );
|
|
663
674
|
}
|
|
664
|
-
result[0].activeStoresCount = activeStores.length - yettoInstallCount.length;
|
|
675
|
+
result[0].activeStoresCount = activeStores.length>0?( activeStores.length - yettoInstallCount.length ):0;
|
|
665
676
|
result[0].activeCameraCount = activeCameras;
|
|
666
677
|
return res.sendSuccess( { result: result } );
|
|
667
678
|
} catch ( error ) {
|