7bedcb08e5
When the answer is not default (Custom or UserResponse), don't translate the answers.
25 lines
495 B
JavaScript
25 lines
495 B
JavaScript
import { check } from 'meteor/check';
|
|
import updateVotes from '../modifiers/updateVotes';
|
|
|
|
export default function userVoted({ body }, meetingId) {
|
|
const { poll } = body;
|
|
|
|
check(meetingId, String);
|
|
check(poll, {
|
|
id: String,
|
|
questionType: String,
|
|
questionText: String,
|
|
answers: [
|
|
{
|
|
id: Number,
|
|
key: String,
|
|
numVotes: Number,
|
|
},
|
|
],
|
|
numRespondents: Number,
|
|
numResponders: Number,
|
|
});
|
|
|
|
return updateVotes(poll, meetingId);
|
|
}
|