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

21 lines
738 B
JavaScript
Raw Normal View History

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