bigbluebutton-Github/bigbluebutton-html5/imports/api/presentations/server/modifiers/removePresentationFromCollection.js
Anton Georgiev 8d52dc1b40 Merge branch 'join-components-with-skeleton' of github.com:perroned/bigbluebutton into router-merging
Conflicts:
	bigbluebutton-html5/imports/api/chat/server/methods/sendChatMessagetoServer.js
	bigbluebutton-html5/imports/api/meetings/server/modifiers/addMeetingToCollection.js
	bigbluebutton-html5/imports/api/polls/server/methods/publishVoteMessage.js
	bigbluebutton-html5/imports/api/slides/server/modifiers/clearSlidesCollection.js
	bigbluebutton-html5/imports/api/users/server/methods/muteUser.js
	bigbluebutton-html5/imports/api/users/server/methods/setUserPresenter.js
	bigbluebutton-html5/imports/api/users/server/methods/unmuteUser.js
	bigbluebutton-html5/imports/api/users/server/methods/userSetEmoji.js
	bigbluebutton-html5/imports/api/users/server/methods/validateAuthToken.js
	bigbluebutton-html5/imports/startup/server/eventHandlers.js
	bigbluebutton-html5/imports/ui/components/app/AppService.js
2016-05-16 19:54:51 +00:00

19 lines
708 B
JavaScript
Executable File

import Slides from '/imports/api/slides';
import Presentations from '/imports/api/presentations';
import { logger } from '/imports/startup/server/logger';
export function removePresentationFromCollection(meetingId, presentationId) {
let id, presentationObject;
presentationObject = Presentations.findOne({
meetingId: meetingId,
'presentation.id': presentationId,
});
if (presentationObject != null) {
Slides.remove({
presentationId: presentationId,
}, logger.info(`cleared Slides Collection (presentationId: ${presentationId}!`));
Presentations.remove(presentationObject._id);
return logger.info(`----removed presentation[${presentationId}] from ${meetingId}`);
}
};