Skip to content

Commit

Permalink
I am an idiot
Browse files Browse the repository at this point in the history
  • Loading branch information
daemonsy committed Jun 30, 2017
1 parent bdc860d commit 3b57f6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions handlers/store-favorite-line.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ const closestLineMatcher = require('../utilities/closest-line-matcher.js');
module.exports = function() {
let heardNameGroup = this.event.request.intent.slots.subwayLineOrGroup.value;

if(!nameGroup) { this.emit(':tell', "Sorry, I didn't hear a subway line or group I recognized") };
if(!heardNameGroup) { this.emit(':tell', "Sorry, I didn't hear a subway line or group I recognized") };

fetchMTAStatus(statuses => {
let closestLine = closestLineMatcher(statuses, 'nameGroup', heardNameGroup);

this.emit('tell', `Your favorite line is ${closestLine.nameGroup}`);
this.emit(':tell', `Your favorite line is ${closestLine.nameGroup}`);
});
}

0 comments on commit 3b57f6a

Please sign in to comment.