tango-app-api-task 3.2.1-beta-5 → 3.2.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
|
@@ -2364,7 +2364,7 @@ export async function createAiTask( req, res ) {
|
|
|
2364
2364
|
if ( answer.length==0 ) {
|
|
2365
2365
|
return res.sendError( 'please enter Valid AnswerType', 500 );
|
|
2366
2366
|
}
|
|
2367
|
-
if ( inputBody?.answerType === 'multiplechoicesingle'||inputBody?.answerType === '
|
|
2367
|
+
if ( inputBody?.answerType === 'multiplechoicesingle'||inputBody?.answerType === 'multiplechoicemultiple' ) {
|
|
2368
2368
|
console.log( inputBody?.options );
|
|
2369
2369
|
if ( inputBody?.options&& inputBody?.options.length>0 ) {
|
|
2370
2370
|
let optionsResult = [];
|
|
@@ -2423,7 +2423,7 @@ export async function createAiTask( req, res ) {
|
|
|
2423
2423
|
'descriptivetype': 'text',
|
|
2424
2424
|
},
|
|
2425
2425
|
];
|
|
2426
|
-
|
|
2426
|
+
console.log( '--=>', req.files.referenceImage.length );
|
|
2427
2427
|
|
|
2428
2428
|
if ( req.files&& req.files.referenceImage&&req.files.referenceImage.length ) {
|
|
2429
2429
|
let images = [];
|
|
@@ -2439,6 +2439,10 @@ export async function createAiTask( req, res ) {
|
|
|
2439
2439
|
}
|
|
2440
2440
|
question[0].questionReferenceImage = images;
|
|
2441
2441
|
}
|
|
2442
|
+
console.log( '----->', question );
|
|
2443
|
+
if ( inputBody?.answerType === 'image'||inputBody?.answerType === 'descriptiveImage'||inputBody?.answerType === 'multipleImage' ) {
|
|
2444
|
+
answer[0].referenceImage = question[0].questionReferenceImage;
|
|
2445
|
+
}
|
|
2442
2446
|
|
|
2443
2447
|
|
|
2444
2448
|
question = {
|
|
@@ -2477,7 +2481,7 @@ async function findAnswer( type ) {
|
|
|
2477
2481
|
let answer = [];
|
|
2478
2482
|
|
|
2479
2483
|
switch ( type ) {
|
|
2480
|
-
case 'yes/
|
|
2484
|
+
case 'yes/no':
|
|
2481
2485
|
answer = [
|
|
2482
2486
|
{
|
|
2483
2487
|
'answer': 'Yes',
|
|
@@ -2746,3 +2750,18 @@ export async function uploadmultiImage( images ) {
|
|
|
2746
2750
|
return e;
|
|
2747
2751
|
}
|
|
2748
2752
|
};
|
|
2753
|
+
|
|
2754
|
+
|
|
2755
|
+
export async function customertrial( params ) {
|
|
2756
|
+
try {
|
|
2757
|
+
let inputData = {
|
|
2758
|
+
Bucket: 'tango-trax-audit',
|
|
2759
|
+
file_path: 'trail/59-147/b1c5b15c0133dec0c45640d923fda221_10_09_59_000_24_01_2025_false.mp4',
|
|
2760
|
+
};
|
|
2761
|
+
let url = await signedUrl( inputData );
|
|
2762
|
+
console.log( url );
|
|
2763
|
+
} catch ( e ) {
|
|
2764
|
+
logger.error( 'uploadImage =>', e );
|
|
2765
|
+
return e;
|
|
2766
|
+
}
|
|
2767
|
+
};
|
|
@@ -27,6 +27,7 @@ taskRouter
|
|
|
27
27
|
.get( '/duplicateTask/:checklistId', isAllowedSessionHandler, isAllowedClient, accessVerification( { userType: [ 'tango', 'client' ], access: [ { featureName: 'TangoTrax', name: 'Task', permissions: [ 'isEdit' ] } ] } ), taskController.duplicateChecklist )
|
|
28
28
|
.get( '/teamMigrations', taskController.teamMigrations )
|
|
29
29
|
.post( '/createaiChecklist', isAllowedInternalAPIHandler, taskController.createAiChecklist )
|
|
30
|
-
.post( '/createaiTask', isAllowedInternalAPIHandler, taskController.createAiTask )
|
|
30
|
+
.post( '/createaiTask', isAllowedInternalAPIHandler, taskController.createAiTask )
|
|
31
|
+
.get( '/getcoustemer', taskController.customertrial );
|
|
31
32
|
|
|
32
33
|
|