bigbluebutton-Github/bigbluebutton-html5/imports/api/1.1/shapes/server/methods/undoAnnotation.js
Oleksandr Zhurbenko 251bd22738 PR review fixes
2017-09-06 12:36:52 -07:00

25 lines
742 B
JavaScript

import RedisPubSub from '/imports/startup/server/redis';
import { Meteor } from 'meteor/meteor';
import { check } from 'meteor/check';
export default function undoAnnotation(credentials, whiteboardId) {
const REDIS_CONFIG = Meteor.settings.redis;
const CHANNEL = REDIS_CONFIG.channels.toBBBApps.whiteboard;
const EVENT_NAME = 'undo_whiteboard_request';
const { meetingId, requesterUserId, requesterToken } = credentials;
check(meetingId, String);
check(requesterUserId, String);
check(requesterToken, String);
check(whiteboardId, String);
const payload = {
requester_id: requesterUserId,
meeting_id: meetingId,
whiteboard_id: whiteboardId,
};
return RedisPubSub.publish(CHANNEL, EVENT_NAME, payload);
}