From 491ed441e211d0a44f9fb34bf453202b49b81f01 Mon Sep 17 00:00:00 2001 From: Sacha Greif Date: Wed, 9 Oct 2013 21:51:50 +0900 Subject: [PATCH] removed bitly integration --- client/models/setting.js | 4 ++-- collections/posts.js | 17 ----------------- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/client/models/setting.js b/client/models/setting.js index dfc41ce80..b8645d5d6 100644 --- a/client/models/setting.js +++ b/client/models/setting.js @@ -25,7 +25,7 @@ Setting = FormModel.extend({ clickyId:'', goSquaredId: '', embedlyId: '', - bitlyToken: '', + // bitlyToken: '', footerCode: '', extraCode: '', notes: '' @@ -41,7 +41,7 @@ Setting = FormModel.extend({ this.overwriteTitle('mixpanelId', 'Mixpanel ID'); this.overwriteTitle('clickyId', 'Clicky ID'); this.overwriteTitle('goSquaredId', 'GoSquared ID'); - this.overwriteTitle('bitlyToken', 'Bitly Token'); + // this.overwriteTitle('bitlyToken', 'Bitly Token'); this.overwriteTitle('logoUrl', 'Logo URL'); this.overwriteType('footerCode', 'textarea'); this.overwriteType('extraCode', 'textarea'); diff --git a/collections/posts.js b/collections/posts.js index ebdcfc3eb..ada30eea4 100644 --- a/collections/posts.js +++ b/collections/posts.js @@ -59,23 +59,6 @@ Meteor.methods({ throw new Meteor.Error(605, 'Sorry, you cannot submit more than '+maxPostsPer24Hours+' posts per day'); } - // shorten URL - if(!this.isSimulation && (token=getSetting('bitlyToken'))){ - var shortenResponse = Meteor.http.get( - "https://api-ssl.bitly.com/v3/shorten?", - { - timeout: 5000, - params:{ - "format": "json", - "access_token": token, - "longUrl": post.url - } - } - ); - if(shortenResponse.statusCode == 200) - post.shortUrl = shortenResponse.data.data.url - } - post = _.extend(post, { headline: headline, body: body,