2019-04-06 06:32:21 +08:00
|
|
|
import { check } from 'meteor/check';
|
|
|
|
import addUserInfo from '../modifiers/addUserInfo';
|
|
|
|
|
2019-04-11 03:40:40 +08:00
|
|
|
export default function handleUserInformation({ header, body }) {
|
2019-04-06 06:32:21 +08:00
|
|
|
check(body, Object);
|
2019-04-11 03:40:40 +08:00
|
|
|
check(header, Object);
|
2019-04-06 06:32:21 +08:00
|
|
|
|
2019-04-11 03:40:40 +08:00
|
|
|
const { userInfo } = body;
|
|
|
|
const { userId, meetingId } = header;
|
|
|
|
|
|
|
|
check(userInfo, Array);
|
|
|
|
check(userId, String);
|
|
|
|
check(meetingId, String);
|
|
|
|
|
|
|
|
return addUserInfo(userInfo, userId, meetingId);
|
2019-04-06 06:32:21 +08:00
|
|
|
}
|