Добавил слип для теста
This commit is contained in:
parent
815bdd6704
commit
26699df626
2 changed files with 3 additions and 2 deletions
|
@ -1,3 +1,5 @@
|
|||
import asyncio
|
||||
|
||||
from fastapi import APIRouter, Depends, status
|
||||
|
||||
from app.config import settings
|
||||
|
@ -28,6 +30,7 @@ router = APIRouter(prefix="/chat", tags=["Чат"])
|
|||
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
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import asyncio
|
||||
from random import randrange
|
||||
|
||||
from fastapi import APIRouter, Depends, status
|
||||
|
@ -166,7 +165,6 @@ async def login_user(user_data: SUserLogin, uow=Depends(UnitOfWork)):
|
|||
response_model=SUserResponse,
|
||||
)
|
||||
async def get_user(current_user: SUser = Depends(get_current_user)):
|
||||
await asyncio.sleep(10)
|
||||
return current_user
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue