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

18 lines
600 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 sendAnnotation(annotation) {
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);
2021-05-04 22:38:56 +08:00
sendAnnotationHelper(annotation, meetingId, requesterUserId);
} catch (err) {
Logger.error(`Exception while invoking method sendAnnotation ${err.stack}`);
}
}