bigbluebutton-Github/bigbluebutton-html5/imports/api/polls/index.js

18 lines
476 B
JavaScript
Raw Normal View History

2017-10-12 08:33:57 +08:00
import { Meteor } from 'meteor/meteor';
const collectionOptions = Meteor.isClient ? {
connection: null,
} : {};
const Polls = new Mongo.Collection('polls', collectionOptions);
export const CurrentPoll = new Mongo.Collection('current-poll', { connection: null });
2017-10-12 08:33:57 +08:00
if (Meteor.isServer) {
// We can have just one active poll per meeting
// makes no sense to index it by anything other than meetingId
Polls.createIndexAsync({ meetingId: 1 });
2017-10-12 08:33:57 +08:00
}
export default Polls;