Coverage for kwai/api/v1/auth/endpoints/user.py: 86%
7 statements
« prev ^ index » next coverage.py v7.3.0, created at 2023-09-05 17:55 +0000
« prev ^ index » next coverage.py v7.3.0, created at 2023-09-05 17:55 +0000
1"""Module that implements all user endpoints."""
3from fastapi import APIRouter, Depends
5from kwai.api.dependencies import get_current_user
6from kwai.modules.identity.users.user import UserEntity
8router = APIRouter()
11@router.get("/user")
12def get(user: UserEntity = Depends(get_current_user)):
13 """Get the current user."""
14 return {"id": str(user.uuid)}