tango-app-api-trax 3.3.1-beta-6 → 3.3.1-beta-7

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-trax",
3
- "version": "3.3.1-beta-6",
3
+ "version": "3.3.1-beta-7",
4
4
  "description": "Trax",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -3340,3 +3340,24 @@ export async function clientConfig( req, res ) {
3340
3340
  return res.sendError( e, 500 );
3341
3341
  }
3342
3342
  }
3343
+
3344
+ export async function updatePlanoStatus( req, res ) {
3345
+ try {
3346
+ if ( !req.body.id ) {
3347
+ return res.sendError( 'Processed checklist id is required' );
3348
+ }
3349
+ if ( !req.body.status ) {
3350
+ return res.sendError( 'status is required' );
3351
+ }
3352
+ let processCheckDetails = await processedchecklist.findOne( { _id: req.body.id } );
3353
+ if ( !processCheckDetails ) {
3354
+ return res.sendError( 'No data found', 204 );
3355
+ }
3356
+ processCheckDetails.checklistStatus = req.body.status;
3357
+ processCheckDetails.save();
3358
+ return res.sendSuccess( 'Status updated Successfully' );
3359
+ } catch ( e ) {
3360
+ logger.error( { error: e, function: 'updatePlanoStatus' } );
3361
+ return res.sendError( e, 500 );
3362
+ }
3363
+ }
@@ -25,5 +25,6 @@ mobileRouter
25
25
  .post( '/verifylocation', isAllowedSessionHandler, mobileController.getStoreLocation, mobileController.location )
26
26
  .post( '/login', mobileController.login )
27
27
  .post( '/checkUpdateVersion', mobileController.checkVersion )
28
- .post( '/checkClientConfig', isAllowedSessionHandler, mobileController.clientConfig );
28
+ .post( '/checkClientConfig', isAllowedSessionHandler, mobileController.clientConfig )
29
+ .post( '/updatePlanoStatus', isAllowedSessionHandler, mobileController.updatePlanoStatus );
29
30