Skip to content

Instantly share code, notes, and snippets.

@export-mike
Last active February 13, 2016 23:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save export-mike/9b4c0e3b4e65455ca0a1 to your computer and use it in GitHub Desktop.
Save export-mike/9b4c0e3b4e65455ca0a1 to your computer and use it in GitHub Desktop.
lnug-tito-twitter-hook.io
module['exports'] = function titoTwitterList (hook) {
var body = hook.req.body;
var twitterAnswer = body.answers.filter(function (a) {
return a.question.title === 'Twitter';
})[0];
if (twitterAnswer && twitterAnswer.response) {
console.log('Username: ' + twitterAnswer.response);
} else {
hook.res.end('Unrecognised payload');
}
};
module['exports'].schema = {
"answers": []
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment