2018-04-06 03:59:26 +08:00
|
|
|
import { Meteor } from 'meteor/meteor';
|
|
|
|
import { check } from 'meteor/check';
|
2018-04-10 11:57:24 +08:00
|
|
|
import PresentationPods from '/imports/api/presentation-pods';
|
2018-04-06 03:59:26 +08:00
|
|
|
import Logger from '/imports/startup/server/logger';
|
|
|
|
|
|
|
|
function presentationPods(credentials) {
|
|
|
|
const { meetingId, requesterUserId, requesterToken } = credentials;
|
|
|
|
|
|
|
|
check(meetingId, String);
|
|
|
|
check(requesterUserId, String);
|
|
|
|
check(requesterToken, String);
|
|
|
|
|
2019-03-09 00:00:16 +08:00
|
|
|
Logger.debug(`Publishing presentation-pods for ${meetingId} ${requesterUserId} ${requesterToken}`);
|
2018-04-06 03:59:26 +08:00
|
|
|
|
|
|
|
return PresentationPods.find({ meetingId });
|
|
|
|
}
|
|
|
|
|
|
|
|
function publish(...args) {
|
|
|
|
const boundPresentationPods = presentationPods.bind(this);
|
2018-11-06 03:30:37 +08:00
|
|
|
return boundPresentationPods(...args);
|
2018-04-06 03:59:26 +08:00
|
|
|
}
|
|
|
|
|
2018-04-10 11:57:24 +08:00
|
|
|
Meteor.publish('presentation-pods', publish);
|