fixing-straw
Some checks failed
deploy / deploy (push) Failing after 41s

This commit is contained in:
2023-11-26 13:51:06 +03:00
parent 62c8d51c5d
commit 993f064633
5 changed files with 30 additions and 9 deletions

View File

@@ -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: