2020-02-07 04:47:28 +08:00
|
|
|
import { extractCredentials } from '/imports/api/common/server/helpers';
|
|
|
|
import sendAnnotationHelper from './sendAnnotationHelper';
|
2021-03-17 00:15:41 +08:00
|
|
|
import { check } from 'meteor/check';
|
2019-02-14 00:15:09 +08:00
|
|
|
|
2020-02-07 04:47:28 +08:00
|
|
|
export default function sendBulkAnnotations(payload) {
|
|
|
|
const { meetingId, requesterUserId } = extractCredentials(this.userId);
|
2019-02-14 00:15:09 +08:00
|
|
|
|
2021-03-17 00:15:41 +08:00
|
|
|
check(meetingId, String);
|
|
|
|
check(requesterUserId, String);
|
|
|
|
|
2020-02-07 04:47:28 +08:00
|
|
|
payload.forEach(annotation => sendAnnotationHelper(annotation, meetingId, requesterUserId));
|
2019-02-14 00:15:09 +08:00
|
|
|
}
|