webhook-fix

This commit is contained in:
Untone 2024-03-04 19:08:21 +03:00
parent 5ff28ce31b
commit 21bcda1e3b

View File

@ -30,7 +30,7 @@ class WebhookEndpoint(HTTPEndpoint):
pic: str = user.get('picture', '')
with local_session() as session:
author = session.query(Author).filter(Author.email == email).first()
author = session.query(Author).filter(Author.user == user_id).first()
if not author:
# If the author does not exist, create a new one
slug: str = email.split('@')[0].replace(".", "-").lower()