bigbluebutton-Github/bigbluebutton-html5/imports/api/users-infos/server/modifiers/addUserInfo.js
2020-11-26 13:23:57 -03:00

21 lines
535 B
JavaScript

import UserInfos from '/imports/api/users-infos';
import Logger from '/imports/startup/server/logger';
export default function addUserInfo(userInfo, requesterUserId, meetingId) {
const info = {
meetingId,
requesterUserId,
userInfo,
};
try {
const numberAffected = UserInfos.insert(info);
if (numberAffected) {
Logger.info(`Added user information: requester id=${requesterUserId} meeting=${meetingId}`);
}
} catch (err) {
Logger.error(`Adding user information to collection: ${err}`);
}
}