diff options
Diffstat (limited to 'models')
-rw-r--r-- | models/announcements.js (renamed from models/notices.js) | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/models/notices.js b/models/announcements.js index d62f6797..2cb1e1b7 100644 --- a/models/notices.js +++ b/models/announcements.js @@ -1,6 +1,6 @@ -Notices = new Mongo.Collection('notices'); +Announcements = new Mongo.Collection('announcements'); -Notices.attachSchema(new SimpleSchema({ +Announcements.attachSchema(new SimpleSchema({ enabled: { type: Boolean, defaultValue: false, @@ -19,7 +19,7 @@ Notices.attachSchema(new SimpleSchema({ }, })); -Notices.allow({ +Announcements.allow({ update(userId) { const user = Users.findOne(userId); return user && user.isAdmin; @@ -28,9 +28,9 @@ Notices.allow({ if (Meteor.isServer) { Meteor.startup(() => { - const notices = Notices.findOne({}); - if(!notices){ - Notices.insert({enabled: false, sort: 0}); + const announcements = Announcements.findOne({}); + if(!announcements){ + Announcements.insert({enabled: false, sort: 0}); } }); } |