fix billing

This commit is contained in:
2025-08-27 22:17:33 -03:00
parent b3a4b48fe5
commit 83c97f409b
12 changed files with 129 additions and 45 deletions

View File

@@ -17,7 +17,10 @@ def lookup(username: str):
r = meili_client.index(USER_TABLE).search(f'"{username}"')
if user := glom(r, 'hits.0', default=None):
return pick(('id', 'name', 'email', 'cognito__sub'), user)
cognito_sub = user.get('cognito:sub')
return {'cognito__sub': cognito_sub} | pick(
('id', 'name', 'email', 'cognito__sub'), user
)
return JSONResponse(
body={'message': 'User not found.'},