/**
 * @openapi
 * /api/scope/children:
 *   get:
 *     tags: [Scope]
 *     summary: Tenants the user can drill into below a parent (or their own tenant)
 *     description: >
 *       Returns org → schools → campuses → classes one level below `parentLevel`/
 *       `parentId` (or below the caller's own tenant when omitted), scoped to the
 *       caller. Used by the tenant switcher / drill-down.
 *     parameters:
 *       - in: query
 *         name: parentLevel
 *         schema: { type: string, enum: [organization, school, campus] }
 *       - in: query
 *         name: parentId
 *         schema: { type: string, format: uuid }
 *       - in: query
 *         name: limit
 *         schema: { type: integer, minimum: 1 }
 *     responses:
 *       200: { description: Child tenants. }
 *       403: { $ref: '#/components/responses/ForbiddenError' }
 */
import express from 'express';
import { wrapAsync } from '@/api/http/request';
import * as scope from '@/api/controllers/scope.controller';

const router = express.Router();

router.get('/children', wrapAsync(scope.children));

export default router;
