bigbluebutton-Github/bigbluebutton-html5/imports/api/timer/server/methods/switchTimer.js
AtilaU19 7a6e457f5d refactor(timer): updateTimer fuction argument list
Replacement of the list of arguments of the update Timer function in an object and adequacy of its calls in the functions when necessary.
2023-05-18 15:29:39 -03:00

19 lines
500 B
JavaScript

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);
check(meetingId, String);
check(requesterUserId, String);
updateTimer({
action: 'switch',
meetingId,
requesterUserId,
stopwatch,
});
}