|
|
router.get('/children', loginRequiredStrictly, adminRequired, validator.listChildren, async(req, res) => {
|
|
router.get('/children', loginRequiredStrictly, adminRequired, validator.listChildren, async(req, res) => {
|
|
|
const { parentIds, includeGrandChildren = false } = req.query;
|
|
const { parentIds, includeGrandChildren = false } = req.query;
|
|
|
const userGroupsResult = await UserGroup.findChildUserGroupsByParentIds(parentIds, includeGrandChildren);
|
|
const userGroupsResult = await UserGroup.findChildUserGroupsByParentIds(parentIds, includeGrandChildren);
|
|
|
childUserGroups: userGroupsResult.childUserGroups,
|
|
childUserGroups: userGroupsResult.childUserGroups,
|