add user with tasks and endpoint
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from fastapi import HTTPException
|
||||
|
||||
from src.schemas.users import User, UserUpdate
|
||||
from src.schemas.users import User, UserUpdate, UserWithTasks
|
||||
from src.services.base import BaseService
|
||||
|
||||
|
||||
@@ -43,3 +43,4 @@ class UserService(BaseService):
|
||||
user = await self.session.user.get_one_with_load(user_id)
|
||||
if user is None:
|
||||
raise HTTPException(status_code=404, detail="User not found.")
|
||||
return UserWithTasks.model_validate(user)
|
||||
|
||||
Reference in New Issue
Block a user