2017-10-12 10:00:28 +08:00
|
|
|
import Meetings from '/imports/api/meetings';
|
2016-10-22 00:27:47 +08:00
|
|
|
import Logger from '/imports/startup/server/logger';
|
|
|
|
|
2017-10-12 10:00:28 +08:00
|
|
|
import clearUsers from '/imports/api/users/server/modifiers/clearUsers';
|
2018-09-14 02:09:30 +08:00
|
|
|
import clearUsersSettings from '/imports/api/users-settings/server/modifiers/clearUsersSettings';
|
2018-08-06 20:05:07 +08:00
|
|
|
import clearGroupChat from '/imports/api/group-chat/server/modifiers/clearGroupChat';
|
2017-10-12 10:00:28 +08:00
|
|
|
import clearBreakouts from '/imports/api/breakouts/server/modifiers/clearBreakouts';
|
|
|
|
import clearAnnotations from '/imports/api/annotations/server/modifiers/clearAnnotations';
|
|
|
|
import clearSlides from '/imports/api/slides/server/modifiers/clearSlides';
|
|
|
|
import clearPolls from '/imports/api/polls/server/modifiers/clearPolls';
|
|
|
|
import clearCaptions from '/imports/api/captions/server/modifiers/clearCaptions';
|
2018-09-20 01:48:15 +08:00
|
|
|
import clearPresentationPods from '/imports/api/presentation-pods/server/modifiers/clearPresentationPods';
|
2017-10-12 10:00:28 +08:00
|
|
|
import clearVoiceUsers from '/imports/api/voice-users/server/modifiers/clearVoiceUsers';
|
2016-10-22 00:27:47 +08:00
|
|
|
|
2018-09-20 01:48:15 +08:00
|
|
|
|
2016-10-22 00:27:47 +08:00
|
|
|
export default function removeMeeting(meetingId) {
|
2017-10-12 06:17:42 +08:00
|
|
|
return Meetings.remove({ meetingId }, () => {
|
|
|
|
clearCaptions(meetingId);
|
2018-08-06 20:05:07 +08:00
|
|
|
clearGroupChat(meetingId);
|
2018-09-20 01:48:15 +08:00
|
|
|
clearPresentationPods(meetingId);
|
2017-10-12 06:17:42 +08:00
|
|
|
clearBreakouts(meetingId);
|
|
|
|
clearPolls(meetingId);
|
|
|
|
clearAnnotations(meetingId);
|
|
|
|
clearSlides(meetingId);
|
|
|
|
clearUsers(meetingId);
|
2018-09-14 02:09:30 +08:00
|
|
|
clearUsersSettings(meetingId);
|
2017-10-12 06:17:42 +08:00
|
|
|
clearVoiceUsers(meetingId);
|
2016-10-22 00:27:47 +08:00
|
|
|
|
2017-10-12 06:17:42 +08:00
|
|
|
return Logger.info(`Cleared Meetings with id ${meetingId}`);
|
|
|
|
});
|
2017-06-03 03:25:02 +08:00
|
|
|
}
|