2017-06-27 02:00:28 +08:00
|
|
|
import Logger from '/imports/startup/server/logger';
|
2017-07-14 04:21:27 +08:00
|
|
|
import Breakouts from '/imports/api/2.0/breakouts';
|
2017-06-27 02:00:28 +08:00
|
|
|
|
2017-08-12 04:17:35 +08:00
|
|
|
export default function clearBreakouts(breakoutId) {
|
|
|
|
if (breakoutId) {
|
2017-06-27 02:00:28 +08:00
|
|
|
const selector = {
|
2017-08-12 04:17:35 +08:00
|
|
|
breakoutId,
|
2017-06-27 02:00:28 +08:00
|
|
|
};
|
|
|
|
|
2017-08-03 04:14:01 +08:00
|
|
|
return Breakouts.remove(selector);
|
2017-06-27 02:00:28 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
return Breakouts.remove({}, Logger.info('Cleared Breakouts (all)'));
|
|
|
|
}
|