2017-08-03 03:52:13 +08:00
|
|
|
import Annotations from '/imports/api/2.0/annotations';
|
2017-07-27 20:35:55 +08:00
|
|
|
import Logger from '/imports/startup/server/logger';
|
|
|
|
|
2017-08-03 04:14:01 +08:00
|
|
|
export default function clearAnnotations(meetingId, whiteboardId) {
|
|
|
|
if (meetingId && whiteboardId) {
|
|
|
|
return Annotations.remove({ meetingId, whiteboardId }, Logger.info(`Cleared Annotations from whiteboard ${whiteboardId} (${meetingId})`));
|
|
|
|
} else if (meetingId) {
|
2017-07-27 20:35:55 +08:00
|
|
|
return Annotations.remove({ meetingId }, Logger.info(`Cleared Annotations (${meetingId})`));
|
|
|
|
}
|
|
|
|
|
|
|
|
return Annotations.remove({}, Logger.info('Cleared Annotations (all)'));
|
|
|
|
}
|