VORKOUT-8 #13

Merged
vlad.dev merged 30 commits from VORKOUT-8 into master 2025-07-02 12:23:44 +05:00
2 changed files with 3 additions and 2 deletions
Showing only changes of commit 18bb79262c - Show all commits

View File

@ -13,7 +13,7 @@ from api.schemas.account.account import User
from api.schemas.endpoints.account import AllUserResponse, all_user_adapter
async def get_user_accaunt_page(connection: AsyncConnection, page, limit) -> Optional[User]:
async def get_user_accaunt_page(connection: AsyncConnection, page, limit) -> Optional[AllUserResponse]:
"""
Получает список ползовелей заданных значениями page, limit.
"""
@ -47,7 +47,7 @@ async def get_user_accaunt_page(connection: AsyncConnection, page, limit) -> Opt
validated_users = all_user_adapter.validate_python(users_data)
return AllUserResponse(users=validated_users, amount_count=total_count, amount_pages=total_pages)
return AllUserResponse(users=validated_users, amount_count=total_count, amount_pages=total_pages, current_page=page)
async def get_user_by_id(connection: AsyncConnection, id: int) -> Optional[User]:

View File

@ -35,6 +35,7 @@ class AllUserResponse(Base):
users: List[AllUser]
amount_count: int
amount_pages: int
current_page: int
all_user_adapter = TypeAdapter(List[AllUser])