From 439cb147d83a59e5fe2cb3779c52b85399492377 Mon Sep 17 00:00:00 2001 From: Miwory Date: Mon, 24 Nov 2025 03:01:49 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B0=D1=82=D1=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/users/v1/router.py | 30 ++++++++++++++++++++++++++++++ src/apps/users/v1/schema.py | 11 +++++++++++ 2 files changed, 41 insertions(+) create mode 100644 src/apps/users/v1/schema.py 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]