bigbluebutton-Github/bigbluebutton-html5/imports/api/polls/server/handlers/userVoted.js
germanocaumo 7bedcb08e5 fix(poll): don't translate user/presenter typed answers
When the answer is not default (Custom or UserResponse), don't translate the answers.
2021-06-11 16:55:53 +00:00

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);
}