update_profile-
All checks were successful
Deploy to core / deploy (push) Successful in 1m37s

This commit is contained in:
Untone 2024-02-03 17:44:28 +03:00
parent 2008345e69
commit 33193b2345
4 changed files with 6 additions and 6 deletions

View File

@ -23,4 +23,4 @@ jobs:
with: with:
branch: 'feature/core' branch: 'feature/core'
git_remote_url: 'ssh://dokku@v2.discours.io:22/core' git_remote_url: 'ssh://dokku@v2.discours.io:22/core'
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}

View File

@ -6,7 +6,7 @@ from resolvers.author import (
get_authors_all, get_authors_all,
load_authors_by, load_authors_by,
rate_author, rate_author,
update_profile, update_author,
) )
from resolvers.community import get_communities_all, get_community from resolvers.community import get_communities_all, get_community
from resolvers.editor import create_shout, delete_shout, update_shout from resolvers.editor import create_shout, delete_shout, update_shout
@ -39,7 +39,7 @@ __all__ = [
'get_author_followed', 'get_author_followed',
'load_authors_by', 'load_authors_by',
'rate_author', 'rate_author',
'update_profile', 'update_author',
# community # community
'get_community', 'get_community',
'get_communities_all', 'get_communities_all',

View File

@ -70,9 +70,9 @@ async def author_followings(author_id: int):
} }
@mutation.field('update_profile') @mutation.field('update_author')
@login_required @login_required
async def update_profile(_, info, profile): async def update_author(_, info, profile):
user_id = info.context['user_id'] user_id = info.context['user_id']
with local_session() as session: with local_session() as session:
author = session.query(Author).where(Author.user == user_id).first() author = session.query(Author).where(Author.user == user_id).first()

View File

@ -1,7 +1,7 @@
type Mutation { type Mutation {
# author # author
rate_author(rated_slug: String!, value: Int!): CommonResult! rate_author(rated_slug: String!, value: Int!): CommonResult!
update_profile(profile: ProfileInput!): CommonResult! update_author(profile: ProfileInput!): CommonResult!
# editor # editor
create_shout(inp: ShoutInput!): CommonResult! create_shout(inp: ShoutInput!): CommonResult!