// Telescope.newsletter = {}; // var campaignSchema = new SimpleSchema({ // _id: { // type: String, // optional: true // }, // createdAt: { // type: Date, // optional: true // }, // sentAt: { // type: String, // optional: true // }, // status: { // type: String, // optional: true // }, // posts: { // type: [String], // optional: true // }, // webHits: { // type: Number, // optional: true // }, // }); // const Campaigns = new Meteor.Collection("campaigns", { // schema: campaignSchema // }); // // create new "campaign" view for all posts from the past X days that haven't been scheduled yet // Posts.views.add("campaign", function (terms) { // return { // find: { // scheduledAt: {$exists: false}, // postedAt: { // $gte: terms.after // } // }, // options: {sort: {baseScore: -1}} // }; // }); // export default Campaigns;