2017-07-25 21:51:33 +08:00
|
|
|
import Meetings from '/imports/api/2.0/meetings';
|
|
|
|
import Logger from '/imports/startup/server/logger';
|
|
|
|
|
|
|
|
import clearUsers from '/imports/api/2.0/users/server/modifiers/clearUsers';
|
|
|
|
import clearChats from '/imports/api/2.0/chat/server/modifiers/clearChats';
|
|
|
|
import clearBreakouts from '/imports/api/2.0/breakouts/server/modifiers/clearBreakouts';
|
2017-08-03 03:52:13 +08:00
|
|
|
import clearAnnotations from '/imports/api/2.0/annotations/server/modifiers/clearAnnotations';
|
2017-07-25 21:51:33 +08:00
|
|
|
import clearSlides from '/imports/api/2.0/slides/server/modifiers/clearSlides';
|
|
|
|
import clearPolls from '/imports/api/2.0/polls/server/modifiers/clearPolls';
|
|
|
|
import clearCursor from '/imports/api/2.0/cursor/server/modifiers/clearCursor';
|
|
|
|
import clearCaptions from '/imports/api/2.0/captions/server/modifiers/clearCaptions';
|
|
|
|
import clearPresentations from '/imports/api/2.0/presentations/server/modifiers/clearPresentations';
|
2017-08-01 23:00:07 +08:00
|
|
|
import clearVoiceUsers from '/imports/api/2.0/voice-users/server/modifiers/clearVoiceUsers';
|
2017-07-25 21:51:33 +08:00
|
|
|
|
|
|
|
export default function removeMeeting(meetingId) {
|
|
|
|
return Meetings.remove({ meetingId }, () => {
|
|
|
|
clearCaptions(meetingId);
|
|
|
|
clearChats(meetingId);
|
|
|
|
clearCursor(meetingId);
|
|
|
|
clearPresentations(meetingId);
|
|
|
|
clearBreakouts(meetingId);
|
|
|
|
clearPolls(meetingId);
|
2017-07-27 20:35:55 +08:00
|
|
|
clearAnnotations(meetingId);
|
2017-07-25 21:51:33 +08:00
|
|
|
clearSlides(meetingId);
|
|
|
|
clearUsers(meetingId);
|
2017-08-01 23:00:07 +08:00
|
|
|
clearVoiceUsers(meetingId);
|
2017-07-25 21:51:33 +08:00
|
|
|
|
|
|
|
return Logger.info(`Cleared Meetings with id ${meetingId}`);
|
|
|
|
});
|
|
|
|
}
|