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

23 lines
800 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
console.log("!!!!!!! sendBulkAnnotations!!!!:", payload)
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;
}
}