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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-app-api-task",
3
- "version": "3.2.1-hotfix-2",
3
+ "version": "3.2.1-hotfix-4",
4
4
  "description": "Task",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -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 > 0 ) {
3579
- let optionsResult = [];
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,
@@ -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.string().optional(),
53
+ options: Joi.array().optional(),
54
54
  scheduleDate: Joi.string().optional(),
55
55
  scheduleEndTime: Joi.string().optional(),
56
56
  approver: Joi.string().required(),