7a6e457f5d
Replacement of the list of arguments of the update Timer function in an object and adequacy of its calls in the functions when necessary.
19 lines
478 B
JavaScript
19 lines
478 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 setTimer(time) {
|
|
check(time, Number);
|
|
|
|
const { meetingId, requesterUserId } = extractCredentials(this.userId);
|
|
check(meetingId, String);
|
|
check(requesterUserId, String);
|
|
|
|
updateTimer({
|
|
action: 'set',
|
|
meetingId,
|
|
requesterUserId,
|
|
time,
|
|
});
|
|
}
|