Fixed issue with Link Generation to connect patreon account

This commit is contained in:
Stefan Zermatten
2019-05-10 10:03:01 +02:00
parent 2a703900ee
commit fabb884831
2 changed files with 6 additions and 3 deletions

View File

@@ -1,9 +1,14 @@
import { format as formatUrl } from 'url';
const CLIENT_ID = Meteor.settings &&
Meteor.settings.public.patreon &&
Meteor.settings.public.patreon.clientId;
Template.registerHelper("patreonLoginUrl", function() {
if (!CLIENT_ID) return;
if (!CLIENT_ID) {
console.warn('Could not find Meteor.settings.public.patreon.clientId to make patreon link')
return;
}
return formatUrl({
protocol: 'https',
host: 'patreon.com',

View File

@@ -1,5 +1,3 @@
import { format as formatUrl } from 'url';
Template.profile.onCreated(function(){
this.showApiKey = new ReactiveVar(false);
this.loadingPatreon = new ReactiveVar(false);