Twilio node.js调查应用程序循环问题

时间:2018-10-23 15:17:14

标签: node.js twilio survey

我的twilio node.js调查应用程序在通话过程中不断循环播放第二个问题,而第二个问题的输入没有保存到数据库中,有什么想法吗?

        questionResponse.type = currentQuestion.type;
        surveyResponse.responses.push(questionResponse);

        // If new responses length is the length of survey, mark as done
        if (surveyResponse.responses.length === surveyData.length) {
            surveyResponse.complete = true;
        }

        // Save response
        surveyResponse.save(function(err) {
            if (err) {
                reask();
            } else {
                cb.call(surveyResponse, err, surveyResponse, responseLength+1);
            }
        });
    }
};

谢谢

0 个答案:

没有答案