Keep session open

This commit is contained in:
Bilal
2018-01-08 21:13:23 +00:00
parent 1a9227e76d
commit 84c11f1b2f
2 changed files with 6 additions and 4 deletions

View File

@@ -46,12 +46,12 @@ var updateIntentsJSON = function () {
utterances: intent.questions,
},
function (request, response) {
return response.say (intent.answer);
return response.say (intent.answer).shouldEndSession(false);
}
);
});
alexaApp.launch ((request, response) => {
return response.say (skill.invocationAnswer);
return response.say (skill.invocationAnswer).shouldEndSession(false);
});
})
.catch (err => {
@@ -94,10 +94,12 @@ router.post ('/updateSkill/:id', async (req, res, next) => {
let id = req.params.id;
let skill = req.body;
delete skill._id;
console.log('id = ' + id);
if (id !== '-1') {
amazonHelper
.updateSkill (skill)
.then (amazonResult => {
console.log('amazon result : ' + amazonResult);
if (amazonResult === 200 || amazonResult === 202) {
//Skill uploaded, it's ok to update databaseI
databaseHelper