bigbluebutton-Github/bigbluebutton-html5/imports/api/meetings/server/handlers/selectRandomViewer.js
2020-09-25 19:41:30 +00:00

14 lines
407 B
JavaScript

import { check } from 'meteor/check';
import updateRandomViewer from '../modifiers/updateRandomViewer';
export default function randomlySelectedUser({ header, body }) {
const { selectedUserId, requestedBy } = body;
const { meetingId } = header;
check(meetingId, String);
check(requestedBy, String);
check(selectedUserId, String);
updateRandomViewer(meetingId, selectedUserId, requestedBy);
}