2017-10-12 08:59:35 +08:00
|
|
|
import { Meteor } from 'meteor/meteor';
|
|
|
|
|
2021-10-20 04:35:39 +08:00
|
|
|
const collectionOptions = Meteor.isClient ? {
|
|
|
|
connection: null,
|
|
|
|
} : {};
|
|
|
|
|
|
|
|
const Slides = new Mongo.Collection('slides', collectionOptions);
|
|
|
|
const SlidePositions = new Mongo.Collection('slide-positions', collectionOptions);
|
2017-10-12 08:59:35 +08:00
|
|
|
|
|
|
|
if (Meteor.isServer) {
|
|
|
|
// types of queries for the slides:
|
|
|
|
|
2018-04-11 07:27:11 +08:00
|
|
|
// 1. meetingId ( 1 )
|
|
|
|
// 2. meetingId, podId ( 1 )
|
|
|
|
// 3. meetingId, presentationId ( 1 )
|
|
|
|
// 3. meetingId, presentationId, num ( 1 )
|
|
|
|
// 4. meetingId, podId, presentationId, id ( 3 ) - incl. resizeSlide, which can be intense
|
|
|
|
// 5. meetingId, podId, presentationId, current ( 1 )
|
|
|
|
|
2023-04-01 04:40:41 +08:00
|
|
|
Slides.createIndexAsync({
|
2018-04-11 07:27:11 +08:00
|
|
|
meetingId: 1, podId: 1, presentationId: 1, id: 1,
|
|
|
|
});
|
2019-08-01 03:10:41 +08:00
|
|
|
|
2023-04-01 04:40:41 +08:00
|
|
|
SlidePositions.createIndexAsync({
|
2019-08-01 03:10:41 +08:00
|
|
|
meetingId: 1, podId: 1, presentationId: 1, id: 1,
|
|
|
|
});
|
2017-10-12 08:59:35 +08:00
|
|
|
}
|
|
|
|
|
2019-08-01 03:10:41 +08:00
|
|
|
export { Slides, SlidePositions };
|