2016-10-21 21:21:09 +08:00
|
|
|
import { check } from 'meteor/check';
|
|
|
|
import addPoll from '../modifiers/addPoll';
|
|
|
|
|
|
|
|
export default function pollStarted({ payload }) {
|
|
|
|
check(payload, Object);
|
|
|
|
|
|
|
|
const meetingId = payload.meeting_id;
|
|
|
|
const requesterId = payload.requester_id;
|
|
|
|
const poll = payload.poll;
|
|
|
|
|
|
|
|
check(meetingId, String);
|
|
|
|
check(requesterId, String);
|
|
|
|
check(poll, Object);
|
|
|
|
|
2016-10-22 02:56:42 +08:00
|
|
|
return addPoll(meetingId, requesterId, poll);
|
2016-10-21 21:21:09 +08:00
|
|
|
}
|