bigbluebutton-Github/bigbluebutton-html5/imports/api/note/server/publishers.js
2019-05-08 20:36:36 +00:00

24 lines
623 B
JavaScript

import { Meteor } from 'meteor/meteor';
import { check } from 'meteor/check';
import Logger from '/imports/startup/server/logger';
import Note from '/imports/api/note';
function note(credentials) {
const { meetingId, requesterUserId, requesterToken } = credentials;
check(meetingId, String);
check(requesterUserId, String);
check(requesterToken, String);
Logger.info(`Publishing note for ${meetingId} ${requesterUserId} ${requesterToken}`);
return Note.find({ meetingId });
}
function publish(...args) {
const boundNote = note.bind(this);
return boundNote(...args);
}
Meteor.publish('note', publish);