bigbluebutton-Github/bigbluebutton-html5/imports/api/annotations/server/modifiers/removeAnnotation.js
2017-10-11 18:09:35 -07:00

26 lines
646 B
JavaScript

import { check } from 'meteor/check';
import Annotations from '/imports/api/2.0/annotations';
import Logger from '/imports/startup/server/logger';
export default function removeAnnotation(meetingId, whiteboardId, shapeId) {
check(meetingId, String);
check(whiteboardId, String);
check(shapeId, String);
const selector = {
meetingId,
whiteboardId,
id: shapeId,
};
const cb = (err) => {
if (err) {
return Logger.error(`Removing annotation from collection: ${err}`);
}
return Logger.info(`Removed annotation id=${shapeId} whiteboard=${whiteboardId}`);
};
return Annotations.remove(selector, cb);
}