2017-06-29 04:37:45 +08:00
|
|
|
import { check } from 'meteor/check';
|
|
|
|
import removePoll from '../modifiers/removePoll';
|
2019-05-22 22:44:17 +08:00
|
|
|
import setPublishedPoll from '../../../meetings/server/modifiers/setPublishedPoll';
|
2017-06-29 04:37:45 +08:00
|
|
|
|
2017-06-30 22:26:19 +08:00
|
|
|
export default function pollPublished({ body }, meetingId) {
|
2017-06-29 04:37:45 +08:00
|
|
|
const { pollId } = body;
|
|
|
|
|
|
|
|
check(meetingId, String);
|
2019-05-22 22:44:17 +08:00
|
|
|
check(pollId, String);
|
|
|
|
|
|
|
|
setPublishedPoll(meetingId, true);
|
2017-06-29 04:37:45 +08:00
|
|
|
|
|
|
|
return removePoll(meetingId, pollId);
|
|
|
|
}
|