bigbluebutton-Github/bigbluebutton-html5/imports/api/slides/server/modifiers/clearSlides.js

23 lines
591 B
JavaScript
Raw Normal View History

import { Slides, SlidePositions } from '/imports/api/slides';
2016-10-21 19:41:17 +08:00
import Logger from '/imports/startup/server/logger';
2016-05-13 01:43:59 +08:00
2016-11-12 03:02:46 +08:00
export default function clearSlides(meetingId) {
2016-10-21 19:41:17 +08:00
if (meetingId) {
SlidePositions.remove({ meetingId }, () => {
Logger.info(`Cleared SlidePositions (${meetingId})`);
});
return Slides.remove({ meetingId }, () => {
Logger.info(`Cleared Slides (${meetingId})`);
});
2016-05-16 22:35:59 +08:00
}
2016-11-18 20:28:55 +08:00
SlidePositions.remove({}, () => {
Logger.info('Cleared SlidePositions (all)');
});
return Slides.remove({}, () => {
Logger.info('Cleared Slides (all)');
});
2017-06-03 03:25:02 +08:00
}