bigbluebutton-Github/bigbluebutton-html5/imports/api/polls/server/handlers/pollStopped.js
2017-10-11 18:09:35 -07:00

20 lines
406 B
JavaScript

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