removed bitly integration

This commit is contained in:
Sacha Greif 2013-10-09 21:51:50 +09:00
parent cf2e2533bc
commit 491ed441e2
2 changed files with 2 additions and 19 deletions

View file

@ -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', '<a href="http://mixpanel.com/">Mixpanel</a> ID');
this.overwriteTitle('clickyId', '<a href="http://getclicky.com/">Clicky</a> ID');
this.overwriteTitle('goSquaredId', '<a href="http://gosquared.com/">GoSquared</a> ID');
this.overwriteTitle('bitlyToken', '<a href="https://bitly.com/a/oauth_apps">Bitly</a> Token');
// this.overwriteTitle('bitlyToken', '<a href="https://bitly.com/a/oauth_apps">Bitly</a> Token');
this.overwriteTitle('logoUrl', 'Logo URL');
this.overwriteType('footerCode', 'textarea');
this.overwriteType('extraCode', 'textarea');

View file

@ -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,