mirror of
https://github.com/vale981/Vulcan
synced 2025-03-09 20:16:39 -04:00

1) The route /email/campaign was broken in
ceeb7bf531
. the method
getNextCampaignSchedule() was removed.
e.g. http://meta.telesc.pe/email/campaign
2) The wrong comment count helper was used in the newsletter template
resulting in it being undefined and so you wouldn’t see a count. I’m
guessing this was broken when the post schema was changed as it comes
from a post’s document.
30 lines
No EOL
1 KiB
JavaScript
30 lines
No EOL
1 KiB
JavaScript
Meteor.startup(function () {
|
|
|
|
Router.route('/email/campaign', {
|
|
name: 'campaign',
|
|
where: 'server',
|
|
action: function() {
|
|
var campaign = buildCampaign(getCampaignPosts(getSetting('postsPerNewsletter', 5)));
|
|
var campaignSubject = '<div class="campaign-subject"><strong>Subject:</strong> '+campaign.subject+' (note: contents might change)</div>';
|
|
var campaignSchedule = '<div class="campaign-schedule"><strong>Scheduled for:</strong> '+ Meteor.call('getNextJob') +'</div>';
|
|
|
|
this.response.write(campaignSubject+campaignSchedule+campaign.html);
|
|
this.response.end();
|
|
}
|
|
});
|
|
|
|
Router.route('/email/digest-confirmation', {
|
|
name: 'digestConfirmation',
|
|
where: 'server',
|
|
action: function() {
|
|
var confirmationHtml = getEmailTemplate('emailDigestConfirmation')({
|
|
time: 'January 1st, 1901',
|
|
newsletterLink: 'http://example.com',
|
|
subject: 'Lorem ipsum dolor sit amet'
|
|
});
|
|
this.response.write(buildEmailTemplate(confirmationHtml));
|
|
this.response.end();
|
|
}
|
|
});
|
|
|
|
}); |