service_man/api/service/user.py

11 lines
236 B
Python
Raw Normal View History

2024-03-06 02:28:59 +03:00
from api.uow.uow_base import IUnitOfWork
2024-03-04 07:12:29 +03:00
class UserService:
2024-03-06 02:28:59 +03:00
def __init__(self, uow: IUnitOfWork):
self.uow = uow
2024-03-04 07:12:29 +03:00
2024-03-04 13:15:28 +03:00
async def get_all_users(self):
2024-03-06 02:28:59 +03:00
async with self.uow:
await self.uow.users.find_all()