2019-04-06 06:32:21 +08:00
|
|
|
import { check } from 'meteor/check';
|
|
|
|
import addUserInfo from '../modifiers/addUserInfo';
|
|
|
|
|
2023-03-09 21:30:34 +08:00
|
|
|
export default async 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);
|
|
|
|
|
2023-03-09 21:30:34 +08:00
|
|
|
const result = await addUserInfo(userInfo, userId, meetingId);
|
|
|
|
return result;
|
2019-04-06 06:32:21 +08:00
|
|
|
}
|