Esempio n. 1
0
async def show(
        user_repo: UserRepo = Depends(UserRepo),
        token: TokenPayload = Depends(ScopedTo("profile")),
        user: User = Depends(current_user),
):
    item = user_repo.set_results(user).data()
    return UserResponse(user=item)
Esempio n. 2
0
async def show(
        user_repo: UserRepo = Depends(UserRepo()),
        token: TokenPayload = Depends(ScopedTo("profile")),
        user: User = Depends(current_user),
):
    logger.critical("Loading user")
    item = user_repo.set_results(user).data()
    return UserResponse(user=item)