bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/whiteboard/annotation-group/service.js

39 lines
713 B
JavaScript
Raw Normal View History

2020-04-07 04:34:08 +08:00
import { Annotations, UnsentAnnotations } from '/imports/ui/components/whiteboard/service';
2017-07-27 20:35:55 +08:00
const getCurrentAnnotationsInfo = (whiteboardId) => {
2017-07-27 20:35:55 +08:00
if (!whiteboardId) {
return null;
}
return Annotations.find(
{
whiteboardId,
2020-04-07 04:34:08 +08:00
},
{
sort: { position: 1 },
fields: { status: 1, _id: 1, annotationType: 1 },
},
).fetch();
};
const getUnsetAnnotations = (whiteboardId) => {
if (!whiteboardId) {
return null;
}
return UnsentAnnotations.find(
{
whiteboardId,
},
{
2017-10-10 09:30:29 +08:00
sort: { position: 1 },
fields: { status: 1, _id: 1, annotationType: 1 },
},
).fetch();
2017-07-27 20:35:55 +08:00
};
export default {
getCurrentAnnotationsInfo,
2020-04-07 04:34:08 +08:00
getUnsetAnnotations,
2017-07-27 20:35:55 +08:00
};