bigbluebutton-Github/bigbluebutton-html5/imports/api/timer/server/methods/createTimer.js
Pedro Beschorner Marin 5463a4a423 Stopwatch handlers
2023-05-18 15:29:31 -03:00

18 lines
526 B
JavaScript

import { check } from 'meteor/check';
import Logger from '/imports/startup/server/logger';
import { isEnabled } from '/imports/api/timer/server/helpers';
import addTimer from '/imports/api/timer/server/modifiers/addTimer';
// This method should only be used by the server
export default function createTimer(meetingId) {
check(meetingId, String);
// Avoid timer creation if this feature is disabled
if (!isEnabled()) {
Logger.warn(`Timers are disabled for ${meetingId}`);
return;
}
addTimer(meetingId);
}