feat: ud service

This commit is contained in:
2024-04-30 02:46:18 +03:00
parent 203adb025b
commit 4f62bb2468

View File

@@ -23,7 +23,11 @@ class ClientService(BaseService):
return details
async def get_all(self) -> ClientGetAllResponse:
clients_query = await self.session.scalars(select(Client).options(joinedload(Client.details)))
clients_query = await self.session.scalars(
select(Client)
.options(joinedload(Client.details))
.order_by(Client.id.desc())
)
clients = clients_query.all()
result = []
for client in clients: