2016-11-19 01:35:28 +08:00
|
|
|
import Logger from '/imports/startup/server/logger';
|
|
|
|
import { check } from 'meteor/check';
|
|
|
|
|
2016-11-19 01:59:11 +08:00
|
|
|
import addShape from '../modifiers/addShape';
|
2016-11-19 01:35:28 +08:00
|
|
|
|
|
|
|
export default function handleWhiteboardSend({ payload }) {
|
|
|
|
const meetingId = payload.meeting_id;
|
|
|
|
const shape = payload.shape;
|
|
|
|
|
|
|
|
check(meetingId, String);
|
|
|
|
check(shape, Object);
|
|
|
|
|
|
|
|
const whiteboardId = shape.wb_id;
|
|
|
|
|
|
|
|
check(whiteboardId, String);
|
|
|
|
|
|
|
|
return addShape(meetingId, whiteboardId, shape);
|
|
|
|
};
|