bigbluebutton-Github/bigbluebutton-html5/imports/api/breakouts/server/handlers/updateTimeRemaining.js

26 lines
526 B
JavaScript
Raw Normal View History

2016-11-14 19:57:10 +08:00
import Breakouts from '/imports/api/breakouts';
import Logger from '/imports/startup/server/logger';
2016-11-15 00:12:54 +08:00
import { check } from 'meteor/check';
2016-11-14 19:57:10 +08:00
export default function updateTimeRemaining({ payload }) {
2016-11-15 00:12:54 +08:00
const {
meetingId,
timeRemaining,
} = payload;
check(meetingId, String);
check(timeRemaining, Number);
2016-11-14 19:57:10 +08:00
const selector = {
parentMeetingId: payload.meetingId,
};
const modifier = {
$set: {
timeRemaining: payload.timeRemaining,
},
};
2016-11-17 01:44:05 +08:00
return Breakouts.update(selector, modifier);
2016-11-14 19:57:10 +08:00
}