mirror of
https://github.com/r-ca/kidshift-skills.git
synced 2024-10-25 17:14:03 +00:00
処理順序修正
This commit is contained in:
parent
b3f2789e48
commit
0aec73c4ac
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue
Block a user