diff --git a/src/apps/users/v1/router.py b/src/apps/users/v1/router.py index 7029c51..92e18f9 100644 --- a/src/apps/users/v1/router.py +++ b/src/apps/users/v1/router.py @@ -14,6 +14,8 @@ from clients.vitacore import schema as vs from shared import exceptions as e from shared.redis import client as cache +from . import schema as s + logger = getLogger(__name__) router = APIRouter( prefix='/user', @@ -375,3 +377,31 @@ async def measurements( for key in await cache.keys(f'tdn:measurement:{user.id}:*') ] return data + + +@router.delete('/account', status_code=status.HTTP_204_NO_CONTENT) +async def delete_account(user: Annotated[User, Depends(login)]): + return + + +@router.get('/notifications') +async def notifications(user: Annotated[User, Depends(login)]): + return s.Notifications( + notifications=[ + { + 'id': 1, + 'title': 'Заголовок уведомления 1', + 'description': 'Описание уведомления', + }, + { + 'id': 2, + 'title': 'Заголовок уведомления 2', + 'description': 'Описание уведомления', + }, + { + 'id': 3, + 'title': 'Заголовок уведомления 3', + 'description': 'Описание уведомления', + }, + ] + ) diff --git a/src/apps/users/v1/schema.py b/src/apps/users/v1/schema.py new file mode 100644 index 0000000..103bae7 --- /dev/null +++ b/src/apps/users/v1/schema.py @@ -0,0 +1,11 @@ +from typing import TypedDict + + +class Notification(TypedDict): + id: int + title: str + description: str + + +class Notifications(TypedDict): + notifications: list[Notification]