bigbluebutton-Github/bigbluebutton-html5/imports/api/deskshare/server/modifiers/clearDeskshareCollection.js
2016-05-12 17:43:59 +00:00

15 lines
515 B
JavaScript

import Deskshare from '/imports/api/deskshare/collection';
import { logger } from '/imports/startup/server/logger';
export function clearDeskshareCollection(meetingId) {
if (meetingId != null) {
Deskshare.remove({ meetingId: meetingId }, function () {
logger.info(`cleared Deskshare Collection (meetingId: ${this.meetingId}!)`);
});
} else {
Deskshare.remove({}, function () {
logger.info(`cleared Deskshare Collection (all meetings)!`);
});
}
}