bigbluebutton-Github/bigbluebutton-html5/imports/ui/services/notification/index.js
2017-06-02 19:25:02 +00:00

29 lines
566 B
JavaScript

import { check } from 'meteor/check';
const 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,
};