gitignore

This commit is contained in:
2024-03-11 18:07:01 +00:00
parent 83bea97f41
commit fb7e64f738
22 changed files with 114 additions and 58 deletions

3
api/services/__init__.py Normal file
View File

@@ -0,0 +1,3 @@
from .user import UserService
__all__ = ("UserService",)

12
api/services/user.py Normal file
View File

@@ -0,0 +1,12 @@
from api.uow.uow_base import UnitOfWork
class UserService:
def __init__(self, uow: UnitOfWork):
self.uow = uow
async def get_all_users(self):
async with self.uow:
res = await self.uow.users.find_all()
return res