tango-app-api-task 3.2.1-hotfix-2 → 3.2.1-hotfix-4
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
|
@@ -3575,10 +3575,8 @@ export async function taskcreation( req, res ) {
|
|
|
3575
3575
|
return res.sendError( 'please enter Valid AnswerType', 500 );
|
|
3576
3576
|
}
|
|
3577
3577
|
if ( inputBody?.answerType === 'multiplechoicesingle' || inputBody?.answerType === 'multiplechoicemultiple' ) {
|
|
3578
|
-
if ( inputBody?.options && inputBody?.options.length >
|
|
3579
|
-
let
|
|
3580
|
-
let optionList = inputBody?.options.split( ',' );
|
|
3581
|
-
for ( let option of optionList ) {
|
|
3578
|
+
if ( inputBody?.options && inputBody?.options.length > 1 ) {
|
|
3579
|
+
for ( let option of inputBody?.options ) {
|
|
3582
3580
|
let optiondata = {
|
|
3583
3581
|
'answer': '',
|
|
3584
3582
|
'sopFlag': false,
|
package/src/dtos/task.dto.js
CHANGED
|
@@ -50,7 +50,7 @@ export const taskcreationSchema = Joi.object().keys( {
|
|
|
50
50
|
user: Joi.string().required(),
|
|
51
51
|
question: Joi.string().required(),
|
|
52
52
|
answerType: Joi.string().required(),
|
|
53
|
-
options: Joi.
|
|
53
|
+
options: Joi.array().optional(),
|
|
54
54
|
scheduleDate: Joi.string().optional(),
|
|
55
55
|
scheduleEndTime: Joi.string().optional(),
|
|
56
56
|
approver: Joi.string().required(),
|