mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
removed bitly integration
This commit is contained in:
parent
cf2e2533bc
commit
491ed441e2
2 changed files with 2 additions and 19 deletions
|
@ -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');
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue