2016-10-21 21:21:09 +08:00
|
|
|
import { check } from 'meteor/check';
|
2016-10-22 01:42:43 +08:00
|
|
|
import updateVotes from '../modifiers/updateVotes';
|
2016-10-21 21:21:09 +08:00
|
|
|
|
2017-10-12 08:33:57 +08:00
|
|
|
export default function userVoted({ body }, meetingId) {
|
|
|
|
const { poll } = body;
|
|
|
|
const { presenterId } = body;
|
2016-10-21 21:21:09 +08:00
|
|
|
|
|
|
|
check(meetingId, String);
|
|
|
|
check(poll, Object);
|
2017-10-12 08:33:57 +08:00
|
|
|
check(presenterId, String);
|
2016-10-21 21:21:09 +08:00
|
|
|
|
2017-10-12 08:33:57 +08:00
|
|
|
return updateVotes(poll, meetingId, presenterId);
|
2017-06-03 03:25:02 +08:00
|
|
|
}
|