tango-app-api-task 3.2.1-beta-10 → 3.2.1-beta-12
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
|
@@ -2341,15 +2341,15 @@ export async function createAiTask( req, res ) {
|
|
|
2341
2341
|
let approverList = inputBody?.approver.split( ',' );
|
|
2342
2342
|
console.log( approverList );
|
|
2343
2343
|
|
|
2344
|
-
let userAdmin = await userService.find( { clientId: inputBody.clientId, email: { $in: approverList }, isActive: true }, { name: '$userName', email: 1 } );
|
|
2344
|
+
let userAdmin = await userService.find( { clientId: inputBody.clientId, email: { $in: approverList }, userType: 'client', isActive: true }, { name: '$userName', email: 1 } );
|
|
2345
2345
|
console.log( userAdmin );
|
|
2346
2346
|
if ( userAdmin&&userAdmin.length===0 ) {
|
|
2347
|
-
return res.sendError( '
|
|
2347
|
+
return res.sendError( 'Invalid Approver Details', 500 );
|
|
2348
2348
|
}
|
|
2349
2349
|
|
|
2350
|
-
let creator = await userService.find( { clientId: inputBody.clientId, email: { $in: inputBody.creator }, isActive: true } );
|
|
2350
|
+
let creator = await userService.find( { clientId: inputBody.clientId, email: { $in: inputBody.creator }, userType: 'client', isActive: true } );
|
|
2351
2351
|
if ( creator&&creator.length===0 ) {
|
|
2352
|
-
return res.sendError( '
|
|
2352
|
+
return res.sendError( 'Invalid Creator Details', 500 );
|
|
2353
2353
|
}
|
|
2354
2354
|
if ( req.files&&req.files.referenceImage&& req.files.referenceImage.length>3 ) {
|
|
2355
2355
|
return res.sendError( 'Maximum 3 referenceImage only allowed', 500 );
|
|
@@ -2447,6 +2447,8 @@ export async function createAiTask( req, res ) {
|
|
|
2447
2447
|
|
|
2448
2448
|
if ( req.files&& req.files.referenceImage&&req.files.referenceImage.length ) {
|
|
2449
2449
|
let images = [];
|
|
2450
|
+
console.log( req.files.referenceImage.length );
|
|
2451
|
+
|
|
2450
2452
|
|
|
2451
2453
|
for ( let image of req.files.referenceImage ) {
|
|
2452
2454
|
let uplaodedImage =await uploadmultiImage( image );
|
package/src/dtos/task.dto.js
CHANGED
|
@@ -9,7 +9,7 @@ export const aitaskvalidationSchema = Joi.object().keys( {
|
|
|
9
9
|
approver: Joi.string().required(),
|
|
10
10
|
options: Joi.string().optional(),
|
|
11
11
|
scheduleDate: Joi.string().optional(),
|
|
12
|
-
|
|
12
|
+
scheduleEndTime: Joi.string().optional(),
|
|
13
13
|
creator: Joi.string().optional(),
|
|
14
14
|
|
|
15
15
|
} );
|