bigbluebutton-Github/bigbluebutton-html5/imports/api/timer/server/methods/switchTimer.js

17 lines
551 B
JavaScript
Raw Normal View History

2020-04-26 03:03:35 +08:00
import { check } from 'meteor/check';
import updateTimer from '/imports/api/timer/server/modifiers/updateTimer';
import { extractCredentials } from '/imports/api/common/server/helpers';
export default function switchTimer(stopwatch) {
check(stopwatch, Boolean);
const { meetingId, requesterUserId } = extractCredentials(this.userId);
2020-04-26 03:03:35 +08:00
check(meetingId, String);
check(requesterUserId, String);
2020-04-26 03:03:35 +08:00
// Bogus value of time. It won't update the collection
const time = 0;
updateTimer('switch', meetingId, requesterUserId, time, stopwatch);
2020-04-26 03:03:35 +08:00
}