Adjusted the PR 'methods' to #4322

This commit is contained in:
Oleksandr Zhurbenko 2017-09-11 12:12:39 -07:00
parent 43b3b89c6a
commit eca8090bac
5 changed files with 5 additions and 35 deletions

View File

@ -23,15 +23,9 @@ export default function clearWhiteboard(credentials, whiteboardId) {
);
}
const header = {
name: EVENT_NAME,
meetingId,
userId: requesterUserId,
};
const payload = {
whiteboardId,
};
return RedisPubSub.publish(CHANNEL, EVENT_NAME, meetingId, payload, header);
return RedisPubSub.publish(CHANNEL, EVENT_NAME, meetingId, payload, { userId: requesterUserId });
}

View File

@ -48,15 +48,9 @@ export default function sendAnnotation(credentials, annotation) {
);
}
const header = {
name: EVENT_NAME,
meetingId,
userId: requesterUserId,
};
const payload = {
annotation,
};
return RedisPubSub.publish(CHANNEL, EVENT_NAME, meetingId, payload, header);
return RedisPubSub.publish(CHANNEL, EVENT_NAME, meetingId, payload, { userId: requesterUserId });
}

View File

@ -23,15 +23,9 @@ export default function undoAnnotation(credentials, whiteboardId) {
);
}
const header = {
name: EVENT_NAME,
meetingId,
userId: requesterUserId,
};
const payload = {
whiteboardId,
};
return RedisPubSub.publish(CHANNEL, EVENT_NAME, meetingId, payload, header);
return RedisPubSub.publish(CHANNEL, EVENT_NAME, meetingId, payload, { userId: requesterUserId });
}

View File

@ -27,16 +27,10 @@ export default function publishCursorUpdate(credentials, coordinates) {
);
}
const header = {
name: EVENT_NAME,
userId: requesterUserId,
meetingId,
};
const payload = {
xPercent: coordinates.xPercent,
yPercent: coordinates.yPercent,
};
return RedisPubSub.publish(CHANNEL, EVENT_NAME, meetingId, payload, header);
return RedisPubSub.publish(CHANNEL, EVENT_NAME, meetingId, payload, { userId: requesterUserId });
}

View File

@ -14,15 +14,9 @@ export default function changeWhiteboardAccess(credentials, multiUser) {
check(requesterToken, String);
check(multiUser, Boolean);
const header = {
name: EVENT_NAME,
userId: requesterUserId,
meetingId,
};
const payload = {
multiUser,
};
return RedisPubSub.publish(CHANNEL, EVENT_NAME, meetingId, payload, header);
return RedisPubSub.publish(CHANNEL, EVENT_NAME, meetingId, payload, { userId: requesterUserId });
}