2017-07-03 23:05:35 +08:00
|
|
|
import Logger from '/imports/startup/server/logger';
|
2017-10-12 01:54:00 +08:00
|
|
|
import Users from '/imports/api/2.0/users/index';
|
2017-07-03 23:05:35 +08:00
|
|
|
|
2017-10-06 20:50:01 +08:00
|
|
|
const clearUsers = (meetingId) => {
|
2017-07-03 23:05:35 +08:00
|
|
|
if (meetingId) {
|
|
|
|
return Users.remove({ meetingId }, Logger.info(`Cleared Users (${meetingId})`));
|
|
|
|
}
|
|
|
|
|
|
|
|
return Users.remove({}, Logger.info('Cleared Users (all)'));
|
2017-10-06 20:50:01 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
export default clearUsers;
|