This commit is contained in:
rca 2024-07-17 09:28:39 +09:00
parent 6149843b84
commit 59c1a8c6ee
2 changed files with 4 additions and 3 deletions

View File

@ -66,8 +66,9 @@ const KidShiftAuthIntentHandler = {
const loginCode = Alexa.getSlotValue(handlerInput.requestEnvelope, 'loginCode'); const loginCode = Alexa.getSlotValue(handlerInput.requestEnvelope, 'loginCode');
const tokenResponse = await AuthService_1.default.login(loginCode); const tokenResponse = await AuthService_1.default.login(loginCode);
if (tokenResponse) { if (tokenResponse) {
handlerInput.attributesManager.setPersistentAttributes(tokenResponse); const attributeUtils = new AttributeUtils_1.default(handlerInput);
await handlerInput.attributesManager.savePersistentAttributes(); await attributeUtils.setToken(tokenResponse.accessToken);
await attributeUtils.saveAttributes();
return handlerInput.responseBuilder return handlerInput.responseBuilder
.speak('Login successful') .speak('Login successful')
.getResponse(); .getResponse();

File diff suppressed because one or more lines are too long