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

20 lines
459 B
JavaScript
Raw Normal View History

2016-11-19 01:35:28 +08:00
import { check } from 'meteor/check';
import clearAnnotations from '../modifiers/clearAnnotations';
2016-11-19 01:35:28 +08:00
export default function handleWhiteboardCleared({ body }, meetingId) {
check(body, {
userId: String,
whiteboardId: String,
fullClear: Boolean,
});
2016-11-19 01:35:28 +08:00
const { whiteboardId, fullClear, userId } = body;
2016-11-19 01:35:28 +08:00
if (fullClear) {
return clearAnnotations(meetingId, whiteboardId);
}
return clearAnnotations(meetingId, whiteboardId, userId);
2017-06-03 03:25:02 +08:00
}