This commit is contained in:
ろむねこ 2024-07-17 14:27:24 +09:00
parent 0aec73c4ac
commit 0608407473
Signed by: Fujimatsu
GPG Key ID: FA1F39A1BA37D168
2 changed files with 3 additions and 3 deletions

View File

@ -101,6 +101,8 @@ const KidShiftTaskCompleteIntentHandler = {
&& Alexa.getIntentName(handlerInput.requestEnvelope) === 'KidShiftTaskCompleteIntent';
},
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 childList = await ChildService_1.default.getChildList();
const taskName = Alexa.getSlotValue(handlerInput.requestEnvelope, 'taskName');
@ -117,8 +119,6 @@ const KidShiftTaskCompleteIntentHandler = {
.speak('Child not found')
.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 handlerInput.responseBuilder
.speak('Task completed')

File diff suppressed because one or more lines are too long