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:
@@ -50,10 +50,10 @@ def get_entity_field_name(entity_type: str) -> str:
|
||||
ValueError: Unknown entity_type: invalid
|
||||
"""
|
||||
entity_field_mapping = {
|
||||
"author": "following", # AuthorFollower.following -> Author
|
||||
"topic": "topic", # TopicFollower.topic -> Topic
|
||||
"author": "following", # AuthorFollower.following -> Author
|
||||
"topic": "topic", # TopicFollower.topic -> Topic
|
||||
"community": "community", # CommunityFollower.community -> Community
|
||||
"shout": "shout", # ShoutReactionsFollower.shout -> Shout
|
||||
"shout": "shout" # ShoutReactionsFollower.shout -> Shout
|
||||
}
|
||||
if entity_type not in entity_field_mapping:
|
||||
msg = f"Unknown entity_type: {entity_type}"
|
||||
@@ -64,7 +64,11 @@ def get_entity_field_name(entity_type: str) -> str:
|
||||
@mutation.field("follow")
|
||||
@login_required
|
||||
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]:
|
||||
"""
|
||||
GraphQL мутация для создания подписки на автора, тему, сообщество или публикацию.
|
||||
@@ -266,7 +270,11 @@ async def follow(
|
||||
@mutation.field("unfollow")
|
||||
@login_required
|
||||
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]:
|
||||
"""
|
||||
GraphQL мутация для отмены подписки на автора, тему, сообщество или публикацию.
|
||||
|
||||
Reference in New Issue
Block a user