2017-06-27 02:00:28 +08:00
|
|
|
import Logger from '/imports/startup/server/logger';
|
|
|
|
import removeMeeting from '/imports/api/1.1/meetings/server/modifiers/removeMeeting';
|
2017-06-27 20:45:08 +08:00
|
|
|
import Breakouts from './../../';
|
2017-06-27 02:00:28 +08:00
|
|
|
|
|
|
|
export default function clearBreakouts(breakoutMeetingId) {
|
|
|
|
if (breakoutMeetingId) {
|
|
|
|
const selector = {
|
|
|
|
breakoutMeetingId,
|
|
|
|
};
|
|
|
|
|
|
|
|
const cb = () => {
|
|
|
|
Logger.info(`Cleared Breakouts (${breakoutMeetingId})`);
|
|
|
|
removeMeeting(breakoutMeetingId);
|
|
|
|
};
|
|
|
|
|
|
|
|
return Breakouts.remove(selector, cb);
|
|
|
|
}
|
|
|
|
|
|
|
|
return Breakouts.remove({}, Logger.info('Cleared Breakouts (all)'));
|
|
|
|
}
|