bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/whiteboard/annotation-group/service.js
2020-04-08 20:03:56 +00:00

39 lines
713 B
JavaScript
Executable File

import { Annotations, UnsentAnnotations } from '/imports/ui/components/whiteboard/service';
const getCurrentAnnotationsInfo = (whiteboardId) => {
if (!whiteboardId) {
return null;
}
return Annotations.find(
{
whiteboardId,
},
{
sort: { position: 1 },
fields: { status: 1, _id: 1, annotationType: 1 },
},
).fetch();
};
const getUnsetAnnotations = (whiteboardId) => {
if (!whiteboardId) {
return null;
}
return UnsentAnnotations.find(
{
whiteboardId,
},
{
sort: { position: 1 },
fields: { status: 1, _id: 1, annotationType: 1 },
},
).fetch();
};
export default {
getCurrentAnnotationsInfo,
getUnsetAnnotations,
};