gitignore
This commit is contained in:
3
api/services/__init__.py
Normal file
3
api/services/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from .user import UserService
|
||||
|
||||
__all__ = ("UserService",)
|
12
api/services/user.py
Normal file
12
api/services/user.py
Normal 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
|
Reference in New Issue
Block a user