Патч
All checks were successful
Build And Push / publish (push) Successful in 55s

This commit is contained in:
2025-11-24 03:01:49 +03:00
parent 7c36a938d8
commit 439cb147d8
2 changed files with 41 additions and 0 deletions

View File

@ -14,6 +14,8 @@ from clients.vitacore import schema as vs
from shared import exceptions as e from shared import exceptions as e
from shared.redis import client as cache from shared.redis import client as cache
from . import schema as s
logger = getLogger(__name__) logger = getLogger(__name__)
router = APIRouter( router = APIRouter(
prefix='/user', prefix='/user',
@ -375,3 +377,31 @@ async def measurements(
for key in await cache.keys(f'tdn:measurement:{user.id}:*') for key in await cache.keys(f'tdn:measurement:{user.id}:*')
] ]
return data 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': 'Описание уведомления',
},
]
)

View File

@ -0,0 +1,11 @@
from typing import TypedDict
class Notification(TypedDict):
id: int
title: str
description: str
class Notifications(TypedDict):
notifications: list[Notification]