bigbluebutton-Github/bigbluebutton-html5/imports/ui/services/notification/index.js
2017-04-28 17:01:02 -03:00

29 lines
575 B
JavaScript

import { check } from 'meteor/check';
let collection = new Mongo.Collection(null);
function findById(notificationId) {
check(notificationId, String);
collection.find({ notificationId });
}
function add(notification) {
check(notification.notification, String);
collection.insert(notification);
}
function remove(notificationId) {
check(notificationId, String);
collection.remove({ notificationId });
}
const NotificationCollection = {findById, add, remove,};
export default NotificationCollection;
export {
findById,
add,
remove,
};