I really hate coffee scripts

This commit is contained in:
Tommy Parnell
2015-08-31 20:01:22 +00:00
parent 129947fe2a
commit fd5664f121

View File

@@ -30,12 +30,11 @@ module.exports = (robot) ->
robot.http("http://www.hobbsbrook.com/amenities/dining")
.get() (err, res, body) ->
# pretend there's error checking code here
if res.statusCode isnt 200
res.send "Request didn't come back HTTP 200 :("
return
$ = cheerio.load(body);
res.send $(':header:contains(275)').parent().parent().find('.btn-pdf').attr('href')
if res.statusCode isnt 200
res.send "Request came back" + res.statusCode
return
$ = cheerio.load(body);
res.send $(':header:contains(275)').parent().parent().find('.btn-pdf').attr('href')
robot.respond /wagon wheel/i, (res) ->
res.send "http://wagonwheelinc.com/wp-content/uploads/2014/10/DELI-MENU-2.pdf"