2016-11-19 01:35:28 +08:00
|
|
|
import { check } from 'meteor/check';
|
|
|
|
|
2018-05-12 00:01:24 +08:00
|
|
|
import { AnnotationsStreamer } from '/imports/api/annotations';
|
2017-10-12 08:52:57 +08:00
|
|
|
import removeAnnotation from '../modifiers/removeAnnotation';
|
2016-11-19 01:35:28 +08:00
|
|
|
|
2017-10-12 08:52:57 +08:00
|
|
|
export default function handleWhiteboardUndo({ body }, meetingId) {
|
|
|
|
const whiteboardId = body.whiteboardId;
|
|
|
|
const shapeId = body.annotationId;
|
2016-11-19 01:35:28 +08:00
|
|
|
|
|
|
|
check(whiteboardId, String);
|
|
|
|
check(shapeId, String);
|
|
|
|
|
2018-05-12 00:01:24 +08:00
|
|
|
AnnotationsStreamer.emit('removed', { meetingId, whiteboardId, shapeId });
|
2017-10-12 08:52:57 +08:00
|
|
|
return removeAnnotation(meetingId, whiteboardId, shapeId);
|
2017-06-03 03:25:02 +08:00
|
|
|
}
|