bigbluebutton-Github/bigbluebutton-html5/imports/api/slides/server/modifiers/clearSlides.js
2019-07-31 12:22:32 -07:00

23 lines
591 B
JavaScript
Executable File

import { Slides, SlidePositions } from '/imports/api/slides';
import Logger from '/imports/startup/server/logger';
export default function clearSlides(meetingId) {
if (meetingId) {
SlidePositions.remove({ meetingId }, () => {
Logger.info(`Cleared SlidePositions (${meetingId})`);
});
return Slides.remove({ meetingId }, () => {
Logger.info(`Cleared Slides (${meetingId})`);
});
}
SlidePositions.remove({}, () => {
Logger.info('Cleared SlidePositions (all)');
});
return Slides.remove({}, () => {
Logger.info('Cleared Slides (all)');
});
}