Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
exports.sayNumber = functions.https.onRequest((req, res) => {
const assistant = new ActionsSdkAssistant({request: req, response: res});
// List of re-prompts that are used when we did not understand a number from the user.
const reprompts = [
'I didn\'t hear a number',
'If you\'re still there, what\'s the number?',
'What is the number?'
];
const actionMap = new Map();
actionMap.set(assistant.StandardIntents.MAIN, assistant => {
const inputPrompt = assistant.buildInputPrompt(true, `
Hi!
I can read out an ordinal number like 123.
Say a number.
`, reprompts
this.app.post('/', function (request, response) {
_this3.assistant = new _actionsOnGoogle.ActionsSdkAssistant({ request: request, response: response });
_this3.assistant.handleRequest(_this3.actionsMap);
});
}
router.post('/', (req, res) => {
this.assistant = new actionsSdk.ActionsSdkAssistant({ request: req, response: res });
this.assistant.handleRequest(this.actionsMap);
res.sendStatus(200);
});
return router;
this.app.post('/', (request, response) => {
this.assistant = new ActionsSdkAssistant({ request, response });
this.assistant.handleRequest(this.actionsMap);
});
}
router.post("/", (req, res) => {
this.assistant = new actionsSdk
.ActionsSdkAssistant({ request: req, response: res });
this.assistant.handleRequest(this.actionsMap);
});
this.express.use("/", router);
router.post('/', (req, res) => {
this.assistant = new actionsSdk.ActionsSdkAssistant({request: req, response: res});
this.assistant.handleRequest(this.actionsMap);
res.sendStatus(200);
});