bigbluebutton-Github/bigbluebutton-html5/imports/api/annotations/server/methods/sendAnnotations.js

18 lines
603 B
JavaScript
Raw Normal View History

import { check } from 'meteor/check';
import sendAnnotationHelper from './sendAnnotationHelper';
import { extractCredentials } from '/imports/api/common/server/helpers';
2021-05-04 22:38:56 +08:00
import Logger from '/imports/startup/server/logger';
export default function sendAnnotations(annotations) {
2021-05-04 22:38:56 +08:00
try {
const { meetingId, requesterUserId } = extractCredentials(this.userId);
2021-05-04 22:38:56 +08:00
check(meetingId, String);
check(requesterUserId, String);
sendAnnotationHelper(annotations, meetingId, requesterUserId);
2021-05-04 22:38:56 +08:00
} catch (err) {
Logger.error(`Exception while invoking method sendAnnotation ${err.stack}`);
}
}