From 0aec73c4ac7128e60a22ef79528a3682aa5a12b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Wed, 17 Jul 2024 14:27:06 +0900 Subject: [PATCH] =?UTF-8?q?=E5=87=A6=E7=90=86=E9=A0=86=E5=BA=8F=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index b289928..856beba 100644 --- a/src/index.ts +++ b/src/index.ts @@ -84,6 +84,9 @@ const KidShiftTaskCompleteIntentHandler = { }, async handle(handlerInput: Alexa.HandlerInput) { + const attributeUtils = new AttributeUtils(handlerInput); + TaskService.setToken(await attributeUtils.getToken()); + const taskList: TaskListResponse = await TaskService.getTasks() const childList: ChildListResponse = await ChildService.getChildList(); @@ -106,9 +109,6 @@ const KidShiftTaskCompleteIntentHandler = { .getResponse(); } - const attributeUtils = new AttributeUtils(handlerInput); - TaskService.setToken(await attributeUtils.getToken()); - return TaskService.completeTask(task.id, child.id).then(() => { return handlerInput.responseBuilder .speak('Task completed')