bigbluebutton-Github/bigbluebutton-html5/imports/api/2.0/polls/server/handlers/pollStopped.js
2017-06-30 11:26:19 -03: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);
}