2021-03-17 00:15:41 +08:00
|
|
|
import { check } from 'meteor/check';
|
2020-02-07 04:47:28 +08:00
|
|
|
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';
|
2017-05-02 05:34:24 +08:00
|
|
|
|
2022-05-04 20:40:56 +08:00
|
|
|
export default function sendAnnotations(annotations) {
|
2021-05-04 22:38:56 +08:00
|
|
|
try {
|
|
|
|
const { meetingId, requesterUserId } = extractCredentials(this.userId);
|
2018-08-01 21:21:33 +08:00
|
|
|
|
2021-05-04 22:38:56 +08:00
|
|
|
check(meetingId, String);
|
|
|
|
check(requesterUserId, String);
|
2021-03-17 00:15:41 +08:00
|
|
|
|
2022-05-04 20:40:56 +08:00
|
|
|
sendAnnotationHelper(annotations, meetingId, requesterUserId);
|
2021-05-04 22:38:56 +08:00
|
|
|
} catch (err) {
|
|
|
|
Logger.error(`Exception while invoking method sendAnnotation ${err.stack}`);
|
|
|
|
}
|
2017-05-02 05:34:24 +08:00
|
|
|
}
|