update clear for meetings, adds breakouts

This commit is contained in:
Gabriel Carvalho de Campes 2016-11-17 13:20:40 -02:00
parent f9cc5d5873
commit 7cdf04dd66
2 changed files with 10 additions and 4 deletions

View File

@ -1,8 +1,12 @@
import Breakouts from '/imports/api/breakouts';
import Logger from '/imports/startup/server/logger';
export default function (meetingId) {
return Breakouts.remove({
breakoutMeetingId: meetingId,
}, Logger.info(`Cleared Breakouts (${meetingId})`));
export default function clearBreakouts(meetingId) {
if (meetingId) {
return Breakouts.remove({
breakoutMeetingId: meetingId,
}, Logger.info(`Cleared Breakouts (${meetingId})`));
}
return Breakouts.remove({}, Logger.info(`Cleared Breakouts (all)`));
}

View File

@ -5,6 +5,7 @@ import removeMeeting from './removeMeeting';
import { clearUsersCollection } from '/imports/api/users/server/modifiers/clearUsersCollection';
import clearChats from '/imports/api/chat/server/modifiers/clearChats';
import { clearShapesCollection } from '/imports/api/shapes/server/modifiers/clearShapesCollection';
import clearBreakouts from '/imports/api/breakouts/server/modifiers/clearBreakouts';
import clearSlides from '/imports/api/slides/server/modifiers/clearSlides';
import clearPolls from '/imports/api/polls/server/modifiers/clearPolls';
import { clearCursorCollection } from '/imports/api/cursor/server/modifiers/clearCursorCollection';
@ -18,6 +19,7 @@ export default function clearMeetings() {
clearChats();
clearCursorCollection();
clearPresentations();
clearBreakouts();
clearPolls();
clearShapesCollection();
clearSlides();