bigbluebutton-Github/bigbluebutton-html5/imports/api/breakouts/server/handlers/updateTimeRemaining.js
2016-11-14 14:12:54 -02:00

26 lines
570 B
JavaScript

import Breakouts from '/imports/api/breakouts';
import Logger from '/imports/startup/server/logger';
import { check } from 'meteor/check';
export default function updateTimeRemaining({ payload }) {
const {
meetingId,
timeRemaining,
} = payload;
check(meetingId, String);
check(timeRemaining, Number);
const selector = {
parentMeetingId: payload.meetingId,
};
const modifier = {
$set: {
timeRemaining: payload.timeRemaining,
},
};
Breakouts.update(selector, modifier, (err, numChanged) => console.log(err, numChanged));
}