Merge branch 'dev' of https://dev.discours.io/discours.io/core into dev
All checks were successful
Deploy on push / deploy (push) Successful in 3m3s
All checks were successful
Deploy on push / deploy (push) Successful in 3m3s
This commit is contained in:
@@ -53,7 +53,7 @@ def get_entity_field_name(entity_type: str) -> str:
|
|||||||
"author": "following", # AuthorFollower.following -> Author
|
"author": "following", # AuthorFollower.following -> Author
|
||||||
"topic": "topic", # TopicFollower.topic -> Topic
|
"topic": "topic", # TopicFollower.topic -> Topic
|
||||||
"community": "community", # CommunityFollower.community -> Community
|
"community": "community", # CommunityFollower.community -> Community
|
||||||
"shout": "shout", # ShoutReactionsFollower.shout -> Shout
|
"shout": "shout" # ShoutReactionsFollower.shout -> Shout
|
||||||
}
|
}
|
||||||
if entity_type not in entity_field_mapping:
|
if entity_type not in entity_field_mapping:
|
||||||
msg = f"Unknown entity_type: {entity_type}"
|
msg = f"Unknown entity_type: {entity_type}"
|
||||||
@@ -64,7 +64,11 @@ def get_entity_field_name(entity_type: str) -> str:
|
|||||||
@mutation.field("follow")
|
@mutation.field("follow")
|
||||||
@login_required
|
@login_required
|
||||||
async def follow(
|
async def follow(
|
||||||
_: None, info: GraphQLResolveInfo, what: str, slug: str = "", entity_id: int | None = None
|
_: None,
|
||||||
|
info: GraphQLResolveInfo,
|
||||||
|
what: str,
|
||||||
|
slug: str = "",
|
||||||
|
entity_id: int | None = None
|
||||||
) -> dict[str, Any]:
|
) -> dict[str, Any]:
|
||||||
"""
|
"""
|
||||||
GraphQL мутация для создания подписки на автора, тему, сообщество или публикацию.
|
GraphQL мутация для создания подписки на автора, тему, сообщество или публикацию.
|
||||||
@@ -266,7 +270,11 @@ async def follow(
|
|||||||
@mutation.field("unfollow")
|
@mutation.field("unfollow")
|
||||||
@login_required
|
@login_required
|
||||||
async def unfollow(
|
async def unfollow(
|
||||||
_: None, info: GraphQLResolveInfo, what: str, slug: str = "", entity_id: int | None = None
|
_: None,
|
||||||
|
info: GraphQLResolveInfo,
|
||||||
|
what: str,
|
||||||
|
slug: str = "",
|
||||||
|
entity_id: int | None = None
|
||||||
) -> dict[str, Any]:
|
) -> dict[str, Any]:
|
||||||
"""
|
"""
|
||||||
GraphQL мутация для отмены подписки на автора, тему, сообщество или публикацию.
|
GraphQL мутация для отмены подписки на автора, тему, сообщество или публикацию.
|
||||||
|
|||||||
Reference in New Issue
Block a user