auth-fix
This commit is contained in:
parent
a8e32ad28c
commit
9344c137f7
4
CHECKS
4
CHECKS
|
@ -1,5 +1,5 @@
|
||||||
WAIT=10
|
WAIT=10
|
||||||
TIMEOUT=10
|
TIMEOUT=10
|
||||||
ATTEMPTS=10
|
ATTEMPTS=3
|
||||||
|
|
||||||
/
|
/graphql
|
||||||
|
|
|
@ -55,7 +55,7 @@ async def check_auth(req):
|
||||||
return is_authenticated, user_id
|
return is_authenticated, user_id
|
||||||
|
|
||||||
|
|
||||||
def author_id_by_user_id(user_id):
|
async def author_id_by_user_id(user_id):
|
||||||
async with local_session() as session:
|
async with local_session() as session:
|
||||||
author = session(Author).where(Author.user == user_id).first()
|
author = session(Author).where(Author.user == user_id).first()
|
||||||
return author.id
|
return author.id
|
||||||
|
|
Loading…
Reference in New Issue
Block a user