mirror of
https://github.com/r-ca/kidshift-skills.git
synced 2024-10-25 17:14:03 +00:00
fix
This commit is contained in:
parent
a03f1a7e7c
commit
899b73c2f4
22
src/index.ts
22
src/index.ts
|
@ -33,22 +33,7 @@ const HelloWorldIntentHandler = {
|
|||
const KidShiftAuthIntentHandler = {
|
||||
canHandle(handlerInput: Alexa.HandlerInput) {
|
||||
return Alexa.getRequestType(handlerInput.requestEnvelope) === 'IntentRequest'
|
||||
&& Alexa.getIntentName(handlerInput.requestEnvelope) === 'KidShiftLoginIntent';
|
||||
},
|
||||
async handle(handlerInput: Alexa.HandlerInput) {
|
||||
const speakOutput = 'Hello World!2';
|
||||
return handlerInput.responseBuilder
|
||||
.speak(speakOutput)
|
||||
.getResponse();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
const KidShiftAuthIntentResutHandler = {
|
||||
canHandle(handlerInput: Alexa.HandlerInput) {
|
||||
return Alexa.getRequestType(handlerInput.requestEnvelope) === 'IntentRequest'
|
||||
&& Alexa.getIntentName(handlerInput.requestEnvelope) === 'KidShiftAuthIntent'
|
||||
&& Alexa.getDialogState(handlerInput.requestEnvelope) === 'COMPLETED';
|
||||
&& Alexa.getIntentName(handlerInput.requestEnvelope) === 'KidShiftAuthIntent';
|
||||
},
|
||||
async handle(handlerInput: Alexa.HandlerInput) {
|
||||
const speakOutput = 'Hello World!2';
|
||||
|
@ -146,13 +131,12 @@ exports.handler = Alexa.SkillBuilders.custom()
|
|||
.addRequestHandlers(
|
||||
LaunchRequestHandler,
|
||||
HelloWorldIntentHandler,
|
||||
KidShiftAuthIntentHandler,
|
||||
HelpIntentHandler,
|
||||
CancelAndStopIntentHandler,
|
||||
FallbackIntentHandler,
|
||||
SessionEndedRequestHandler,
|
||||
IntentReflectorHandler,
|
||||
KidShiftAuthIntentHandler,
|
||||
KidShiftAuthIntentResutHandler)
|
||||
IntentReflectorHandler)
|
||||
.addErrorHandlers(
|
||||
ErrorHandler)
|
||||
.withPersistenceAdapter(new DynamoDBPersistantAttributesAdapter.DynamoDbPersistenceAdapter({
|
||||
|
|
Loading…
Reference in New Issue
Block a user