authorsall-fix

This commit is contained in:
tonyrewin 2022-11-16 19:39:54 +03:00
parent 074f4710f9
commit ec7f82c72f
3 changed files with 3 additions and 3 deletions

View File

@ -66,7 +66,7 @@ async def oauth_login(request):
provider = request.path_params["provider"]
request.session["provider"] = provider
client = oauth.create_client(provider)
redirect_uri = "https://newapi.discours.io/oauth-authorize"
redirect_uri = "https://v2.discours.io/oauth-authorize"
return await client.authorize_redirect(request, redirect_uri)

View File

@ -175,10 +175,9 @@ def author_unfollow(user, slug):
@query.field("authorsAll")
async def get_authors_all(_, _info):
users = await UserStorage.get_all_users()
authorslugs = ShoutAuthorStorage.shouts_by_author.keys()
authors = []
for author in users:
if author.slug in authorslugs:
if ShoutAuthorStorage.shouts_by_author.get(author.slug):
author.stat = await get_author_stat(author.slug)
authors.append(author)
return authors

View File

@ -218,6 +218,7 @@ input ShoutsBy {
topic: String
topics: [String]
author: String
authors: [String]
layout: String
visibility: String
order: String