Merge pull request #51 from Discours/profile-fix

Profile fix
This commit is contained in:
Tony 2022-11-25 14:55:22 +03:00 committed by GitHub
commit 6e073d5dd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@
{{ $upstream_port := index $port_map_list 2 }}
map $http_origin $allow_origin {
~^https?:\/\/((.*\.)?localhost:3000|discoursio-webapp(-(.*))?\.vercel\.app|(.*\.)?discours\.io)$ $http_origin;
~^https?:\/\/((.*\.)?localhost(:\d+)?|discoursio-webapp(-(.*))?\.vercel\.app|(.*\.)?discours\.io)$ $http_origin;
default "";
}

View File

@ -184,7 +184,7 @@ async def get_authors_all(_, _info):
@query.field("getAuthor")
async def get_author(_, _info, slug):
with local_session() as session:
author = session.query(User).join(ShoutAuthor).where(User.slug == slug).first()
author = session.query(User).where(User.slug == slug).first()
author.stat = await get_author_stat(author.slug)
return author