bigbluebutton-Github/bigbluebutton-html5/imports/api/meetings/server/modifiers/setPushLayout.js

30 lines
828 B
JavaScript

import Logger from '/imports/startup/server/logger';
import { LayoutMeetings } from '/imports/api/meetings';
import { check } from 'meteor/check';
export default function setPushLayout(meetingId, pushLayout, requesterUserId) {
try {
check(meetingId, String);
check(requesterUserId, String);
const selector = {
meetingId,
};
// TODO: create a exclusive collection for layout changes
const modifier = {
$set: {
pushLayout,
},
};
const numberAffected = LayoutMeetings.update(selector, modifier);
if (numberAffected) {
Logger.info(`MeetingLayout pushLayout changed to ${pushLayout} for meeting=${meetingId} requested by user=${requesterUserId}`);
}
} catch (err) {
Logger.error(`Exception while invoking method setPushLayout ${err.stack}`);
}
}