tango-app-api-task 3.2.1-beta-12 → 3.2.1-beta-13

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-task",
3
- "version": "3.2.1-beta-12",
3
+ "version": "3.2.1-beta-13",
4
4
  "description": "Task",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -2336,7 +2336,11 @@ export async function createAiTask( req, res ) {
2336
2336
  // const fcmToken = userDetails.fcmToken;
2337
2337
  // await sendPushNotification( title, description, fcmToken );
2338
2338
  // }
2339
-
2339
+ const inputDateTime = dayjs.utc( `${date} ${time}`, 'YYYY-MM-DD hh:mm A' );
2340
+ const currentTime = dayjs.utc();
2341
+ if ( inputDateTime.isBefore( currentTime ) ) {
2342
+ return res.sendError( 'The input date-time is before the current time.', 500 );
2343
+ }
2340
2344
 
2341
2345
  let approverList = inputBody?.approver.split( ',' );
2342
2346
  console.log( approverList );