bigbluebutton-Github/bigbluebutton-html5/imports/api/slides/server/modifiers/clearSlidesPresentation.js
2016-10-21 11:41:17 +00:00

22 lines
525 B
JavaScript

import Slides from '/imports/api/slides';
import Logger from '/imports/startup/server/logger';
import { check } from 'meteor/check';
export default function clearSlidesPresentation(presentationId) {
check(presentationId, String);
const selector = {
presentationId,
};
const cb = (err) => {
if (err) {
return Logger.error(`Removing Slides from collection: ${err}`);
}
return Logger.info(`Removed Slides where presentationId=${presentationId}`);
};
return Slides.remove(selector, cb);
};