2018-09-14 02:09:30 +08:00
|
|
|
import UserSettings from '/imports/api/users-settings';
|
|
|
|
import Logger from '/imports/startup/server/logger';
|
|
|
|
|
2023-03-17 01:47:20 +08:00
|
|
|
export default async function clearUsersSettings(meetingId) {
|
2020-11-25 04:44:13 +08:00
|
|
|
try {
|
2023-03-17 01:47:20 +08:00
|
|
|
const numberAffected = await UserSettings.removeAsync({ meetingId });
|
2020-11-25 04:44:13 +08:00
|
|
|
|
|
|
|
if (numberAffected) {
|
|
|
|
Logger.info(`Cleared User Settings (${meetingId})`);
|
|
|
|
}
|
|
|
|
} catch (err) {
|
|
|
|
Logger.error(`Error on clearing User Settings (${meetingId}). ${err}`);
|
|
|
|
}
|
2018-09-14 02:09:30 +08:00
|
|
|
}
|