MCPcopy
hub / github.com/learnhouse/learnhouse / api_admin_get_user_enrollments

Function api_admin_get_user_enrollments

apps/api/src/routers/admin.py:529–537  ·  view source on GitHub ↗
(
    org_slug: str,
    user_id: int,
    current_user=Depends(get_current_user),
    db_session: AsyncSession = Depends(get_db_session),
)

Source from the content-addressed store, hash-verified

527 },
528)
529async def api_admin_get_user_enrollments(
530 org_slug: str,
531 user_id: int,
532 current_user=Depends(get_current_user),
533 db_session: AsyncSession = Depends(get_db_session),
534) -> TrailRead:
535 token_user = _require_api_token(current_user)
536 await _resolve_org_slug(org_slug, token_user, db_session)
537 return await get_user_enrollments(token_user, user_id, db_session)
538
539
540# ── Progress endpoints ───────────────────────────────────────────────────────

Callers

nothing calls this directly

Calls 3

_require_api_tokenFunction · 0.90
_resolve_org_slugFunction · 0.90
get_user_enrollmentsFunction · 0.90

Tested by

no test coverage detected