bigbluebutton-Github/bigbluebutton-html5/imports/api/meetings/server/modifiers/removeMeeting.js

31 lines
1.4 KiB
JavaScript
Raw Normal View History

2017-10-12 06:17:42 +08:00
import Meetings from '/imports/api/2.0/meetings';
2016-10-22 00:27:47 +08:00
import Logger from '/imports/startup/server/logger';
2017-10-12 06:17:42 +08:00
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';
import clearAnnotations from '/imports/api/2.0/annotations/server/modifiers/clearAnnotations';
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';
import clearVoiceUsers from '/imports/api/2.0/voice-users/server/modifiers/clearVoiceUsers';
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);
clearChats(meetingId);
clearCursor(meetingId);
clearPresentations(meetingId);
clearBreakouts(meetingId);
clearPolls(meetingId);
clearAnnotations(meetingId);
clearSlides(meetingId);
clearUsers(meetingId);
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
}