authorsall-fix
This commit is contained in:
parent
074f4710f9
commit
ec7f82c72f
|
@ -66,7 +66,7 @@ async def oauth_login(request):
|
||||||
provider = request.path_params["provider"]
|
provider = request.path_params["provider"]
|
||||||
request.session["provider"] = provider
|
request.session["provider"] = provider
|
||||||
client = oauth.create_client(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)
|
return await client.authorize_redirect(request, redirect_uri)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -175,10 +175,9 @@ def author_unfollow(user, slug):
|
||||||
@query.field("authorsAll")
|
@query.field("authorsAll")
|
||||||
async def get_authors_all(_, _info):
|
async def get_authors_all(_, _info):
|
||||||
users = await UserStorage.get_all_users()
|
users = await UserStorage.get_all_users()
|
||||||
authorslugs = ShoutAuthorStorage.shouts_by_author.keys()
|
|
||||||
authors = []
|
authors = []
|
||||||
for author in users:
|
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)
|
author.stat = await get_author_stat(author.slug)
|
||||||
authors.append(author)
|
authors.append(author)
|
||||||
return authors
|
return authors
|
||||||
|
|
|
@ -218,6 +218,7 @@ input ShoutsBy {
|
||||||
topic: String
|
topic: String
|
||||||
topics: [String]
|
topics: [String]
|
||||||
author: String
|
author: String
|
||||||
|
authors: [String]
|
||||||
layout: String
|
layout: String
|
||||||
visibility: String
|
visibility: String
|
||||||
order: String
|
order: String
|
||||||
|
|
Loading…
Reference in New Issue
Block a user