bigbluebutton-Github/bigbluebutton-html5/imports/api/auth-token-validation/server/publishers.js
2021-12-15 11:06:07 -03:00

22 lines
592 B
JavaScript

import { Meteor } from 'meteor/meteor';
import AuthTokenValidation from '/imports/api/auth-token-validation';
import Logger from '/imports/startup/server/logger';
function authTokenValidation({ meetingId, userId }) {
const selector = {
meetingId,
userId,
};
Logger.debug(`Publishing auth-token-validation for ${meetingId} ${userId}`);
return AuthTokenValidation.find(selector);
}
function publish(...args) {
const boundAuthTokenValidation = authTokenValidation.bind(this);
return boundAuthTokenValidation(...args);
}
Meteor.publish('auth-token-validation', publish);