2016-10-22 00:27:47 +08:00
|
|
|
import { check } from 'meteor/check';
|
|
|
|
import addMeeting from '../modifiers/addMeeting';
|
|
|
|
|
2017-10-12 06:17:42 +08:00
|
|
|
export default function handleMeetingCreation({ body }) {
|
|
|
|
const meeting = body.props;
|
2019-01-24 00:13:03 +08:00
|
|
|
const durationInSecods = (meeting.durationProps.duration * 60);
|
|
|
|
meeting.durationProps.timeRemaining = durationInSecods;
|
2017-10-12 06:17:42 +08:00
|
|
|
check(meeting, Object);
|
2016-10-22 00:27:47 +08:00
|
|
|
|
2017-10-12 06:17:42 +08:00
|
|
|
return addMeeting(meeting);
|
2017-06-03 03:25:02 +08:00
|
|
|
}
|