2016-10-22 00:27:47 +08:00
|
|
|
import { check } from 'meteor/check';
|
|
|
|
import addMeeting from '../modifiers/addMeeting';
|
|
|
|
|
2023-03-14 00:59:52 +08:00
|
|
|
export default async function handleMeetingCreation({ body }) {
|
2017-10-12 06:17:42 +08:00
|
|
|
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);
|
2023-03-14 00:59:52 +08:00
|
|
|
const result = await addMeeting(meeting);
|
|
|
|
return result;
|
2017-06-03 03:25:02 +08:00
|
|
|
}
|