bigbluebutton-Github/bigbluebutton-html5/imports/api/shapes/server/modifiers/clearShapesCollection.js
2016-05-12 17:43:59 +00:00

19 lines
535 B
JavaScript

import Shapes from '/imports/api/shapes/collection';
import { logger } from '/imports/startup/server/logger';
// called on server start and meeting end
export function clearShapesCollection() {
const meetingId = arguments[0];
if (meetingId != null) {
return Shapes.remove({
meetingId: meetingId,
}, () => {
logger.info(`cleared Shapes Collection (meetingId: ${meetingId}!`);
});
} else {
return Shapes.remove({}, () => {
logger.info('cleared Shapes Collection (all meetings)!');
});
}
};