bigbluebutton-Github/bigbluebutton-html5/imports/api/1.1/shapes/server/modifiers/clearShapesWhiteboard.js
Oleksandr Zhurbenko 251bd22738 PR review fixes
2017-09-06 12:36:52 -07:00

24 lines
553 B
JavaScript

import { check } from 'meteor/check';
import Logger from '/imports/startup/server/logger';
import Shapes from './../../';
export default function clearShapesWhiteboard(meetingId, whiteboardId) {
check(meetingId, String);
check(whiteboardId, String);
const selector = {
meetingId,
whiteboardId,
};
const cb = (err) => {
if (err) {
return Logger.error(`Removing Shapes from collection: ${err}`);
}
return Logger.info(`Removed Shapes where whiteboard=${whiteboardId}`);
};
return Shapes.remove(selector, cb);
}