From 0d4c48874bf690b6e561526b80766e3ee32b8994 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Wed, 22 Feb 2017 22:12:06 +0100 Subject: [PATCH] update breve url --- scripts/shortener.coffee | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/shortener.coffee b/scripts/shortener.coffee index fc5d8fc..451d5cb 100644 --- a/scripts/shortener.coffee +++ b/scripts/shortener.coffee @@ -1,5 +1,5 @@ # Description: -# Accorcia un link usando l'api di breve.xyz +# Accorcia un link usando l'api di brve.bit # # Dependencies: # valid-url @@ -25,7 +25,8 @@ module.exports = (robot) -> robot.respond /breve|accorcia (.+)$/i, (res) -> url = res.match[1] if is_web_uri url - ne.post 'https://breve.xyz/api', url: url, (err, resp, body) => + ne.post 'https://brve.bit/api', url: url, {rejectUnauthorized: false}, (err, resp, body) => + return res.send "c'รจ qualche problema: #{err}" if err res.send (res.random valid) + body.link else - res.send res.random invalid \ No newline at end of file + res.send res.random invalid