bigbluebutton-Github/bigbluebutton-html5/imports/api/annotations/server/handlers/whiteboardUndo.js
2019-10-22 22:26:25 -03:00

16 lines
535 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 handleWhiteboardUndo({ body }, meetingId) {
const whiteboardId = body.whiteboardId;
const shapeId = body.annotationId;
check(whiteboardId, String);
check(shapeId, String);
AnnotationsStreamer(meetingId).emit('removed', { meetingId, whiteboardId, shapeId });
return removeAnnotation(meetingId, whiteboardId, shapeId);
}