bigbluebutton-Github/bigbluebutton-html5/imports/api/polls/server/modifiers/clearPolls.js

15 lines
354 B
JavaScript

import Polls from '/imports/api/polls';
import Logger from '/imports/startup/server/logger';
export default function clearPolls(meetingId) {
if (meetingId) {
return Polls.remove({ meetingId }, () => {
Logger.info(`Cleared Polls (${meetingId})`);
});
}
return Polls.remove({}, () => {
Logger.info('Cleared Polls (all)');
});
}