tango-app-api-client 3.4.0-beta.13 → 3.4.0-beta.14
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.4.0-beta.
|
|
3
|
+
"version": "3.4.0-beta.14",
|
|
4
4
|
"description": "client",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"npm": "^10.9.1",
|
|
28
28
|
"swagger-ui-express": "^5.0.0",
|
|
29
29
|
"tango-api-schema": "^2.2.132",
|
|
30
|
-
"tango-app-api-middleware": "^3.1.
|
|
30
|
+
"tango-app-api-middleware": "^3.1.86",
|
|
31
31
|
"winston": "^3.11.0",
|
|
32
32
|
"winston-daily-rotate-file": "^5.0.0"
|
|
33
33
|
},
|
|
@@ -694,7 +694,6 @@ export async function updateBrandInfo( req, res ) {
|
|
|
694
694
|
const openSearch = JSON.parse( process.env.OPENSEARCH );
|
|
695
695
|
// const url = JSON.parse( process.env.URL );
|
|
696
696
|
let updateKeys = [];
|
|
697
|
-
|
|
698
697
|
if ( req.files?.logo ) {
|
|
699
698
|
const uploadDataParams = {
|
|
700
699
|
Bucket: bucket.assets,
|
|
@@ -704,7 +703,11 @@ export async function updateBrandInfo( req, res ) {
|
|
|
704
703
|
body: req.files.logo.data,
|
|
705
704
|
};
|
|
706
705
|
updateKeys.push( 'Brand Logo' );
|
|
707
|
-
await fileRestrictedUpload( uploadDataParams );
|
|
706
|
+
let uploadStatus= await fileRestrictedUpload( uploadDataParams );
|
|
707
|
+
|
|
708
|
+
if ( uploadStatus==false ) {
|
|
709
|
+
return res.sendError( 'Unsupported Media Type', 415 );
|
|
710
|
+
}
|
|
708
711
|
}
|
|
709
712
|
|
|
710
713
|
if ( Object.keys( req.body ).length > 0 ) {
|
|
@@ -862,7 +865,11 @@ export async function updateBillingDetails( req, res ) {
|
|
|
862
865
|
body: req.files.gstCertificate.data,
|
|
863
866
|
};
|
|
864
867
|
updateKeys.push( 'GST certificate' );
|
|
865
|
-
await fileRestrictedUpload( uploadDataParams );
|
|
868
|
+
let uploadStatus= await fileRestrictedUpload( uploadDataParams );
|
|
869
|
+
|
|
870
|
+
if ( uploadStatus==false ) {
|
|
871
|
+
return res.sendError( 'Unsupported Media Type', 415 );
|
|
872
|
+
}
|
|
866
873
|
}
|
|
867
874
|
|
|
868
875
|
if ( Object.keys( req.body ).length > 0 ) {
|
|
@@ -1346,7 +1353,11 @@ export async function updateDocuments( req, res ) {
|
|
|
1346
1353
|
|
|
1347
1354
|
updateKeys.push( 'Address certificate' );
|
|
1348
1355
|
|
|
1349
|
-
await fileRestrictedUpload( uploadDataParams );
|
|
1356
|
+
let uploadStatus= await fileRestrictedUpload( uploadDataParams );
|
|
1357
|
+
|
|
1358
|
+
if ( uploadStatus==false ) {
|
|
1359
|
+
return res.sendError( 'Unsupported Media Type', 415 );
|
|
1360
|
+
}
|
|
1350
1361
|
}
|
|
1351
1362
|
if ( req.files?.gstDoc ) {
|
|
1352
1363
|
const uploadDataParams = {
|
|
@@ -1359,7 +1370,11 @@ export async function updateDocuments( req, res ) {
|
|
|
1359
1370
|
|
|
1360
1371
|
updateKeys.push( 'GST certificate' );
|
|
1361
1372
|
|
|
1362
|
-
await fileRestrictedUpload( uploadDataParams );
|
|
1373
|
+
let uploadStatus= await fileRestrictedUpload( uploadDataParams );
|
|
1374
|
+
|
|
1375
|
+
if ( uploadStatus==false ) {
|
|
1376
|
+
return res.sendError( 'Unsupported Media Type', 415 );
|
|
1377
|
+
}
|
|
1363
1378
|
}
|
|
1364
1379
|
if ( req.files?.panDoc ) {
|
|
1365
1380
|
const uploadDataParams = {
|
|
@@ -1372,7 +1387,11 @@ export async function updateDocuments( req, res ) {
|
|
|
1372
1387
|
|
|
1373
1388
|
updateKeys.push( 'PAN certificate' );
|
|
1374
1389
|
|
|
1375
|
-
await fileRestrictedUpload( uploadDataParams );
|
|
1390
|
+
let uploadStatus= await fileRestrictedUpload( uploadDataParams );
|
|
1391
|
+
|
|
1392
|
+
if ( uploadStatus==false ) {
|
|
1393
|
+
return res.sendError( 'Unsupported Media Type', 415 );
|
|
1394
|
+
}
|
|
1376
1395
|
}
|
|
1377
1396
|
if ( req.files?.cinDoc ) {
|
|
1378
1397
|
const uploadDataParams = {
|
|
@@ -1385,7 +1404,11 @@ export async function updateDocuments( req, res ) {
|
|
|
1385
1404
|
|
|
1386
1405
|
updateKeys.push( 'CIN certificate' );
|
|
1387
1406
|
|
|
1388
|
-
await fileRestrictedUpload( uploadDataParams );
|
|
1407
|
+
let uploadStatus= await fileRestrictedUpload( uploadDataParams );
|
|
1408
|
+
|
|
1409
|
+
if ( uploadStatus==false ) {
|
|
1410
|
+
return res.sendError( 'Unsupported Media Type', 415 );
|
|
1411
|
+
}
|
|
1389
1412
|
}
|
|
1390
1413
|
|
|
1391
1414
|
const updateAck = await documentsUpdate( {
|