This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
from typing import List
|
||||
|
||||
import strawberry
|
||||
from sqlalchemy import and_
|
||||
from orm.author import Author
|
||||
@@ -45,10 +47,10 @@ def notification_seen_by_viewer(viewer_id, notification_id, session):
|
||||
|
||||
@strawberry.type
|
||||
class Query:
|
||||
@login_required
|
||||
@strawberry.field
|
||||
async def load_notifications(self, info, limit: int = 50, offset: int = 0) -> dict:
|
||||
"""непрочитанные уведомления"""
|
||||
@login_required
|
||||
async def load_notifications(self, info, limit: int = 50, offset: int = 0) -> dict[str, List[Notification] | int]:
|
||||
"""загружаем уведомления"""
|
||||
user_id = info.context["user_id"]
|
||||
|
||||
with local_session() as session:
|
||||
|
Reference in New Issue
Block a user