feat(api): fixed login

This commit is contained in:
Taha Yassine Kraiem 2022-06-13 15:59:54 +02:00
parent d4c7fdcc5f
commit 85c27ff0f5

View file

@ -583,7 +583,7 @@ def authenticate(email, password, for_change_password=False, for_plugin=False):
SET jwt_iat = timezone('utc'::text, now())
WHERE user_id = %(user_id)s
RETURNING jwt_iat;""",
{"user_id": r["id"]})
{"user_id": r["userId"]})
cur.execute(query)
return {
"jwt": authorizers.generate_jwt(r['userId'], r['tenantId'],