mirror of
https://github.com/r-ca/kidshift-skills.git
synced 2024-10-25 17:14:03 +00:00
built
This commit is contained in:
parent
0aec73c4ac
commit
0608407473
|
@ -101,6 +101,8 @@ const KidShiftTaskCompleteIntentHandler = {
|
||||||
&& Alexa.getIntentName(handlerInput.requestEnvelope) === 'KidShiftTaskCompleteIntent';
|
&& Alexa.getIntentName(handlerInput.requestEnvelope) === 'KidShiftTaskCompleteIntent';
|
||||||
},
|
},
|
||||||
async handle(handlerInput) {
|
async handle(handlerInput) {
|
||||||
|
const attributeUtils = new AttributeUtils_1.default(handlerInput);
|
||||||
|
TaskService_1.default.setToken(await attributeUtils.getToken());
|
||||||
const taskList = await TaskService_1.default.getTasks();
|
const taskList = await TaskService_1.default.getTasks();
|
||||||
const childList = await ChildService_1.default.getChildList();
|
const childList = await ChildService_1.default.getChildList();
|
||||||
const taskName = Alexa.getSlotValue(handlerInput.requestEnvelope, 'taskName');
|
const taskName = Alexa.getSlotValue(handlerInput.requestEnvelope, 'taskName');
|
||||||
|
@ -117,8 +119,6 @@ const KidShiftTaskCompleteIntentHandler = {
|
||||||
.speak('Child not found')
|
.speak('Child not found')
|
||||||
.getResponse();
|
.getResponse();
|
||||||
}
|
}
|
||||||
const attributeUtils = new AttributeUtils_1.default(handlerInput);
|
|
||||||
TaskService_1.default.setToken(await attributeUtils.getToken());
|
|
||||||
return TaskService_1.default.completeTask(task.id, child.id).then(() => {
|
return TaskService_1.default.completeTask(task.id, child.id).then(() => {
|
||||||
return handlerInput.responseBuilder
|
return handlerInput.responseBuilder
|
||||||
.speak('Task completed')
|
.speak('Task completed')
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user