bigbluebutton-Github/bigbluebutton-html5/imports/api/captions/server/handlers/padUpdate.js

19 lines
486 B
JavaScript
Raw Normal View History

import { check } from 'meteor/check';
import { getDataFromChangeset } from '/imports/api/captions/server/helpers';
import updatePad from '/imports/api/captions/server/modifiers/updatePad';
export default function handlePadUpdate({ body }) {
const { pad, revs, changeset } = body;
const { id } = pad;
check(id, String);
check(changeset, String);
check(revs, Number);
const data = getDataFromChangeset(changeset);
2019-05-29 22:31:27 +08:00
if (data !== '') {
updatePad(id, data, revs);
}
}