Clear meeting-time-remaining collection
This commit is contained in:
parent
2eb8abcba9
commit
6b3c97037f
@ -0,0 +1,26 @@
|
|||||||
|
import { MeetingTimeRemaining } from '/imports/api/meetings';
|
||||||
|
import Logger from '/imports/startup/server/logger';
|
||||||
|
|
||||||
|
export default function clearMeetingTimeRemaining(meetingId) {
|
||||||
|
if (meetingId) {
|
||||||
|
try {
|
||||||
|
const numberAffected = MeetingTimeRemaining.remove({ meetingId });
|
||||||
|
|
||||||
|
if (numberAffected) {
|
||||||
|
Logger.info(`Cleared MeetingTimeRemaining in (${meetingId})`);
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
Logger.info(`Error on clearing MeetingTimeRemaining in (${meetingId}). ${err}`);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
const numberAffected = MeetingTimeRemaining.remove({});
|
||||||
|
|
||||||
|
if (numberAffected) {
|
||||||
|
Logger.info('Cleared MeetingTimeRemaining in all meetings');
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
Logger.error(`Error on clearing MeetingTimeRemaining in all meetings. ${err}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -18,6 +18,7 @@ import clearVoiceUsers from '/imports/api/voice-users/server/modifiers/clearVoic
|
|||||||
import clearUserInfo from '/imports/api/users-infos/server/modifiers/clearUserInfo';
|
import clearUserInfo from '/imports/api/users-infos/server/modifiers/clearUserInfo';
|
||||||
import clearNote from '/imports/api/note/server/modifiers/clearNote';
|
import clearNote from '/imports/api/note/server/modifiers/clearNote';
|
||||||
import clearNetworkInformation from '/imports/api/network-information/server/modifiers/clearNetworkInformation';
|
import clearNetworkInformation from '/imports/api/network-information/server/modifiers/clearNetworkInformation';
|
||||||
|
import clearMeetingTimeRemaining from '/imports/api/meetings/server/modifiers/clearMeetingTimeRemaining';
|
||||||
import clearLocalSettings from '/imports/api/local-settings/server/modifiers/clearLocalSettings';
|
import clearLocalSettings from '/imports/api/local-settings/server/modifiers/clearLocalSettings';
|
||||||
import clearRecordMeeting from './clearRecordMeeting';
|
import clearRecordMeeting from './clearRecordMeeting';
|
||||||
import clearVoiceCallStates from '/imports/api/voice-call-states/server/modifiers/clearVoiceCallStates';
|
import clearVoiceCallStates from '/imports/api/voice-call-states/server/modifiers/clearVoiceCallStates';
|
||||||
@ -46,6 +47,7 @@ export default function meetingHasEnded(meetingId) {
|
|||||||
clearNote(meetingId);
|
clearNote(meetingId);
|
||||||
clearNetworkInformation(meetingId);
|
clearNetworkInformation(meetingId);
|
||||||
clearLocalSettings(meetingId);
|
clearLocalSettings(meetingId);
|
||||||
|
clearMeetingTimeRemaining(meetingId);
|
||||||
clearRecordMeeting(meetingId);
|
clearRecordMeeting(meetingId);
|
||||||
clearVoiceCallStates(meetingId);
|
clearVoiceCallStates(meetingId);
|
||||||
clearVideoStreams(meetingId);
|
clearVideoStreams(meetingId);
|
||||||
|
Loading…
Reference in New Issue
Block a user