2019-08-01 03:10:41 +08:00
|
|
|
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) {
|
2019-08-01 03:10:41 +08:00
|
|
|
SlidePositions.remove({ meetingId }, () => {
|
|
|
|
Logger.info(`Cleared SlidePositions (${meetingId})`);
|
|
|
|
});
|
|
|
|
|
2018-12-15 04:19:10 +08:00
|
|
|
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
|
|
|
|
2019-08-01 03:10:41 +08:00
|
|
|
SlidePositions.remove({}, () => {
|
|
|
|
Logger.info('Cleared SlidePositions (all)');
|
|
|
|
});
|
|
|
|
|
2018-12-15 04:19:10 +08:00
|
|
|
return Slides.remove({}, () => {
|
|
|
|
Logger.info('Cleared Slides (all)');
|
|
|
|
});
|
2017-06-03 03:25:02 +08:00
|
|
|
}
|