12 lines
353 B
JavaScript
12 lines
353 B
JavaScript
import { check } from 'meteor/check';
|
|
import changeRole from '/imports/api/users/server/modifiers/changeRole';
|
|
|
|
export default function handleChangeRole(payload, meetingId) {
|
|
check(payload.body, Object);
|
|
check(meetingId, String);
|
|
|
|
const { userId, role, changedBy } = payload.body;
|
|
|
|
return changeRole(role, true, userId, meetingId, changedBy);
|
|
}
|