f7793bdc4b
Remove padIds from the closed captions MongoDB collection subscription. Users now have to fetch the padId from Meteor when needed. Meteor is responsible for checking the user's access level and return the proper id.
20 lines
679 B
JavaScript
20 lines
679 B
JavaScript
import { check } from 'meteor/check';
|
|
import Captions from '/imports/api/captions';
|
|
import updateOwnerId from '/imports/api/captions/server/modifiers/updateOwnerId';
|
|
import { extractCredentials } from '/imports/api/common/server/helpers';
|
|
import Logger from '/imports/startup/server/logger';
|
|
|
|
export default function takeOwnership(locale) {
|
|
try {
|
|
const { meetingId, requesterUserId } = extractCredentials(this.userId);
|
|
|
|
check(locale, String);
|
|
check(meetingId, String);
|
|
check(requesterUserId, String);
|
|
|
|
updateOwnerId(meetingId, requesterUserId, locale);
|
|
} catch (err) {
|
|
Logger.error(`Exception while invoking method takeOwnership ${err.stack}`);
|
|
}
|
|
}
|