Revert auth token validation publisher changes
This commit is contained in:
parent
3433396672
commit
da065cb6ea
@ -1,33 +1,11 @@
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { check } from 'meteor/check';
|
||||
import _ from 'lodash';
|
||||
import AuthTokenValidation from '/imports/api/auth-token-validation';
|
||||
import { extractCredentials } from '/imports/api/common/server/helpers';
|
||||
import Logger from '/imports/startup/server/logger';
|
||||
|
||||
async function authTokenValidation({ meetingId, userId }) {
|
||||
check(meetingId, String);
|
||||
check(userId, String);
|
||||
|
||||
const credentials = await new Promise((resp)=> {
|
||||
const tempSettimeout = () => {
|
||||
setTimeout(() => {
|
||||
const cred = extractCredentials(this.userId);
|
||||
const objIsEmpty = _.isEmpty(cred);
|
||||
if (objIsEmpty) {
|
||||
return tempSettimeout();
|
||||
}
|
||||
return resp(cred);
|
||||
}, 200);
|
||||
};
|
||||
tempSettimeout();
|
||||
});
|
||||
|
||||
const { meetingId: mId, requesterUserId } = credentials;
|
||||
|
||||
function authTokenValidation({ meetingId, userId }) {
|
||||
const selector = {
|
||||
meetingId: mId,
|
||||
userId: requesterUserId,
|
||||
meetingId,
|
||||
userId,
|
||||
};
|
||||
|
||||
Logger.debug(`Publishing auth-token-validation for ${meetingId} ${userId}`);
|
||||
|
Loading…
Reference in New Issue
Block a user