bigbluebutton-Github/bigbluebutton-html5/imports/api/meetings/server/handlers/selectRandomViewer.js
2023-03-20 16:24:41 -03:00

15 lines
438 B
JavaScript

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