tango-app-api-task 3.2.1-beta-8 → 3.2.1-beta-9

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,11 +1,11 @@
1
1
  {
2
2
  "name": "tango-app-api-task",
3
- "version": "3.2.1-beta-8",
3
+ "version": "3.2.1-beta-9",
4
4
  "description": "Task",
5
- "main": "app.js",
5
+ "main": "index.js",
6
6
  "type": "module",
7
7
  "scripts": {
8
- "start": "nodemon --exec \"eslint --fix . && node app.js\""
8
+ "start": "nodemon --exec \"eslint --fix . && node index.js\""
9
9
  },
10
10
  "engines": {
11
11
  "node": ">=18.10.0"
@@ -2325,7 +2325,8 @@ export async function createAiTask( req, res ) {
2325
2325
  return res.sendError( 'No user Found For this store', 500 );
2326
2326
  }
2327
2327
  userId = finduser.userId;
2328
-
2328
+ inputBody.userName = finduser.userName;
2329
+ inputBody.userEmail = finduser.userEmail;
2329
2330
 
2330
2331
  // let title = `New Task Alert ${inputBody.taskName}-${storeDetails.storeName}-${dayjs().format( 'YYYY-MM-DD' )}`;
2331
2332
  let time = inputBody?.scheduleEndTime || '11:59 PM';
@@ -2466,6 +2467,7 @@ export async function createAiTask( req, res ) {
2466
2467
  client_id: inputBody.clientId,
2467
2468
  userId: userId,
2468
2469
  };
2470
+ console.log( userDetails );
2469
2471
  await taskAssignService.create( userDetails );
2470
2472
  await insertSingleProcessData( response?._id );
2471
2473
  return res.sendSuccess( 'Task created successfully' );
package/app.js DELETED
@@ -1,46 +0,0 @@
1
- import express from 'express';
2
- import { taskRouter, taskDashboardRouter, taskActionCenterRouter } from './index.js';
3
-
4
- import dotenv from 'dotenv';
5
- import pkg from 'body-parser';
6
- const { json, urlencoded } = pkg;
7
- import fileupload from 'express-fileupload';
8
- import { logger } from 'tango-app-api-middleware';
9
- import { connectdb } from './config/database/database.js';
10
- import responseMiddleware from './config/response/response.js';
11
- import errorMiddleware from './config/response/error.js';
12
- import cors from 'cors';
13
-
14
- const env=dotenv.config();
15
-
16
- const app = express();
17
- const PORT = process.env.PORT || 3000;
18
- app.use( cors() );
19
-
20
- app.use( fileupload() );
21
-
22
- if ( env.error ) {
23
- logger.error( '.env not found' );
24
- process.exit( 1 );
25
- }
26
-
27
- app.use( json( { limit: '500mb' } ) );
28
- app.use(
29
- urlencoded( {
30
- extended: true,
31
- } ),
32
- );
33
-
34
- app.use( responseMiddleware );
35
- app.use( errorMiddleware );
36
-
37
-
38
- app.use( '/task', taskRouter );
39
- app.use( '/task/dashboard', taskDashboardRouter );
40
- app.use( '/task/actionCenter', taskActionCenterRouter );
41
-
42
-
43
- app.listen( PORT, () => {
44
- console.log( `server is running on port= ${PORT} ` );
45
- connectdb();
46
- } );