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

26 lines
653 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
};
try {
const numberAffected = Annotations.remove(selector);
2016-11-19 01:35:28 +08:00
if (numberAffected) {
Logger.info(`Removed annotation id=${shapeId} whiteboard=${whiteboardId}`);
}
} catch (err) {
Logger.error(`Removing annotation from collection: ${err}`);
}
2017-06-03 03:25:02 +08:00
}