bigbluebutton-Github/bigbluebutton-html5/imports/api/annotations/server/modifiers/removeAnnotation.js

26 lines
642 B
JavaScript
Raw Normal View History

2016-11-19 01:35:28 +08:00
import { check } from 'meteor/check';
import Annotations from '/imports/api/annotations';
2016-11-19 01:35:28 +08:00
import Logger from '/imports/startup/server/logger';
export default function removeAnnotation(meetingId, whiteboardId, shapeId) {
2016-11-19 01:35:28 +08:00
check(meetingId, String);
check(whiteboardId, String);
check(shapeId, String);
const selector = {
meetingId,
whiteboardId,
id: shapeId,
2016-11-19 01:35:28 +08:00
};
const cb = (err) => {
2016-11-19 01:35:28 +08:00
if (err) {
return Logger.error(`Removing annotation from collection: ${err}`);
2016-11-19 01:35:28 +08:00
}
return Logger.info(`Removed annotation id=${shapeId} whiteboard=${whiteboardId}`);
2016-11-19 01:35:28 +08:00
};
return Annotations.remove(selector, cb);
2017-06-03 03:25:02 +08:00
}