bigbluebutton-Github/bigbluebutton-html5/imports/api/annotations/server/handlers/whiteboardDelete.js
2022-05-13 02:47:39 +00:00

19 lines
658 B
JavaScript
Executable File

import { check } from 'meteor/check';
import AnnotationsStreamer from '/imports/api/annotations/server/streamer';
import removeAnnotation from '../modifiers/removeAnnotation';
export default function handleWhiteboardDelete({ body }, meetingId) {
const whiteboardId = body.whiteboardId;
const shapesIds = body.annotationsIds;
check(whiteboardId, String);
check(shapesIds, Array);
//console.log("!!!!!!!!!!!! handleWhiteboardDelete !!!!!!!!!!!!!!!!!",shapesIds)
shapesIds.map(shapeId => {
AnnotationsStreamer(meetingId).emit('removed', { meetingId, whiteboardId, shapeId });
removeAnnotation(meetingId, whiteboardId, shapeId);
})
}