Добавил слип для теста

This commit is contained in:
urec56 2024-06-18 17:04:24 +05:00
parent 26699df626
commit 235edd9d4c

View file

@ -24,13 +24,18 @@ from app.users.schemas import SCreateInvitationLink, SUser, SInvitationData
router = APIRouter(prefix="/chat", tags=["Чат"])
@router.get(
"/test"
)
async def root():
await asyncio.sleep(10)
@router.get(
"",
status_code=status.HTTP_200_OK,
response_model=SAllowedChats,
)
async def get_all_chats(user: SUser = Depends(check_verificated_user_with_exc), uow=Depends(UnitOfWork)):
await asyncio.sleep(10)
async with uow:
allowed_chats = await uow.user.get_user_allowed_chats(user.id)
return allowed_chats