mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 12:36:39 -04:00
43 lines
664 B
JavaScript
43 lines
664 B
JavaScript
![]() |
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
|
||
|
},
|
||
|
});
|
||
|
|
||
|
Campaigns = new Meteor.Collection("campaigns", {
|
||
|
schema: campaignSchema
|
||
|
});
|
||
|
|
||
|
addToPostSchema.push(
|
||
|
{
|
||
|
propertyName: 'sentAt',
|
||
|
propertySchema: {
|
||
|
type: Date,
|
||
|
optional: true
|
||
|
}
|
||
|
}
|
||
|
);
|
||
|
|
||
|
viewParameters.campaign = function (terms) {
|
||
|
return {
|
||
|
find: {sentAt: {$exists: false}},
|
||
|
options: {sort: {sticky: -1, score: -1}}
|
||
|
};
|
||
|
}
|