2021-11-29 21:44:14 +08:00
|
|
|
import { check } from 'meteor/check';
|
|
|
|
import changePin from '../modifiers/changePin';
|
|
|
|
|
2023-03-15 21:18:31 +08:00
|
|
|
export default async function handlePinAssigned({ body }, meetingId) {
|
2021-11-29 21:44:14 +08:00
|
|
|
const { userId, pin, changedBy } = body;
|
|
|
|
|
|
|
|
check(meetingId, String);
|
|
|
|
check(userId, String);
|
|
|
|
check(pin, Boolean);
|
|
|
|
check(changedBy, String);
|
|
|
|
|
2023-03-15 21:18:31 +08:00
|
|
|
const result = await changePin(meetingId, userId, pin, changedBy);
|
|
|
|
return result;
|
2021-11-29 21:44:14 +08:00
|
|
|
}
|