Skip to content
Snippets Groups Projects
Commit e2b86eb3 authored by Anton Georgiev's avatar Anton Georgiev
Browse files

adjust guest status body params

parent bf27083c
No related branches found
No related tags found
No related merge requests found
......@@ -5,11 +5,11 @@ import userJoin from '../methods/userJoin';
export default function handleGuestsWaitingForApproval({ header, body }, meetingId) {
const { userId } = header;
const { approved, approvedBy } = body;
const { status, approvedBy } = body;
check(userId, String);
check(meetingId, String);
check(approved, Boolean);
check(status, String);
check(approvedBy, String);
const selector = {
......@@ -19,6 +19,8 @@ export default function handleGuestsWaitingForApproval({ header, body }, meeting
const User = Users.findOne(selector);
const GUEST_STATUS_ALLOW = 'ALLOW';
const approved = GUEST_STATUS_ALLOW === status;
if (User && approved) {
userJoin(meetingId, userId, User.authToken);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment