bigbluebutton-Github/bigbluebutton-html5/imports/api/polls/server/handlers/pollStopped.js

24 lines
478 B
JavaScript

import { check } from 'meteor/check';
import removePoll from '../modifiers/removePoll';
import clearPolls from '../modifiers/clearPolls';
export default async function pollStopped({ body }, meetingId) {
const { poll } = body;
check(meetingId, String);
if (poll) {
const { pollId } = poll;
check(pollId, String);
const result = await removePoll(meetingId, pollId);
return result;
}
const result = await clearPolls(meetingId);
return result;
}