2017-10-12 10:00:28 +08:00
|
|
|
import Polls from '/imports/api/polls';
|
2016-10-22 01:11:28 +08:00
|
|
|
import Logger from '/imports/startup/server/logger';
|
2016-05-13 01:43:59 +08:00
|
|
|
|
2016-10-22 01:11:28 +08:00
|
|
|
export default function clearPolls(meetingId) {
|
|
|
|
if (meetingId) {
|
2018-12-15 04:19:10 +08:00
|
|
|
return Polls.remove({ meetingId }, () => {
|
|
|
|
Logger.info(`Cleared Polls (${meetingId})`);
|
|
|
|
});
|
2016-05-16 22:35:59 +08:00
|
|
|
}
|
2016-10-22 01:42:43 +08:00
|
|
|
|
2018-12-15 04:19:10 +08:00
|
|
|
return Polls.remove({}, () => {
|
|
|
|
Logger.info('Cleared Polls (all)');
|
|
|
|
});
|
2017-06-03 03:25:02 +08:00
|
|
|
}
|