bigbluebutton-Github/bigbluebutton-html5/imports/api/annotations/server/handlers/whiteboardDelete.js

19 lines
658 B
JavaScript
Raw Normal View History

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);
})
}