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

30 lines
497 B
JavaScript
Executable File

import { check } from 'meteor/check';
export default function addAnnotation(meetingId, whiteboardId, userId, annotation) {
check(meetingId, String);
check(whiteboardId, String);
check(annotation, Object);
const {
id, annotationInfo, wbId,
} = annotation;
const selector = {
meetingId,
id,
userId,
};
const modifier = {
$set: {
whiteboardId,
meetingId,
id,
annotationInfo,
wbId,
},
};
return { selector, modifier };
}