Match content-type of incoming request. Fix for Alexa.

This commit is contained in:
Alex
2017-01-28 12:26:30 +00:00
parent b9838291b2
commit 52266a6741
13 changed files with 161 additions and 61 deletions

View File

@ -2,10 +2,10 @@
let fs = require('fs');
let sample = require("./sample.json");
let SendColor = require('./sendColor');
let sendColor = new SendColor("alexellis.io/tree1")
let sendColor = new SendColor("alexellis.io/officelights")
const getStdin = require('get-stdin');
getStdin().then(content => {
let request = JSON.parse(content);
handle(request, request.request.intent);
@ -14,7 +14,7 @@ getStdin().then(content => {
function tellWithCard(speechOutput) {
sample.response.outputSpeech.text = speechOutput
sample.response.card.content = speechOutput
sample.response.card.title = "Christmas Lights";
sample.response.card.title = "Office Lights";
console.log(JSON.stringify(sample));
process.exit(0);
}