diff --git a/.gitea/workflows/main.yml b/.gitea/workflows/main.yml index 8195d4b2..1a9a8824 100644 --- a/.gitea/workflows/main.yml +++ b/.gitea/workflows/main.yml @@ -23,4 +23,4 @@ jobs: with: branch: 'feature/core' git_remote_url: 'ssh://dokku@v2.discours.io:22/core' - ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} \ No newline at end of file + ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} diff --git a/resolvers/__init__.py b/resolvers/__init__.py index 64b4206e..9237f6e3 100644 --- a/resolvers/__init__.py +++ b/resolvers/__init__.py @@ -6,7 +6,7 @@ from resolvers.author import ( get_authors_all, load_authors_by, rate_author, - update_profile, + update_author, ) from resolvers.community import get_communities_all, get_community from resolvers.editor import create_shout, delete_shout, update_shout @@ -39,7 +39,7 @@ __all__ = [ 'get_author_followed', 'load_authors_by', 'rate_author', - 'update_profile', + 'update_author', # community 'get_community', 'get_communities_all', diff --git a/resolvers/author.py b/resolvers/author.py index 6a559126..407e2c8f 100644 --- a/resolvers/author.py +++ b/resolvers/author.py @@ -70,9 +70,9 @@ async def author_followings(author_id: int): } -@mutation.field('update_profile') +@mutation.field('update_author') @login_required -async def update_profile(_, info, profile): +async def update_author(_, info, profile): user_id = info.context['user_id'] with local_session() as session: author = session.query(Author).where(Author.user == user_id).first() diff --git a/schema/mutation.graphql b/schema/mutation.graphql index 87733736..718f5a3f 100644 --- a/schema/mutation.graphql +++ b/schema/mutation.graphql @@ -1,7 +1,7 @@ type Mutation { # author rate_author(rated_slug: String!, value: Int!): CommonResult! - update_profile(profile: ProfileInput!): CommonResult! + update_author(profile: ProfileInput!): CommonResult! # editor create_shout(inp: ShoutInput!): CommonResult!