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

21 lines
738 B
JavaScript

import { extractCredentials } from '/imports/api/common/server/helpers';
import sendAnnotationHelper from './sendAnnotationHelper';
import { check } from 'meteor/check';
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);
sendAnnotationHelper(payload, meetingId, requesterUserId);
//payload.forEach((annotation) => sendAnnotationHelper(annotation, meetingId, requesterUserId));
return true;
} catch (err) {
Logger.error(`Exception while invoking method sendBulkAnnotations ${err.stack}`);
return false;
}
}