fix: main page and creating a user and a wallet

The wallet page will still not renders correctly, but the backend does
create the user his first wallet.
This commit is contained in:
Stefan Stammberger
2021-08-24 21:23:18 +02:00
parent de4d3b012c
commit f119053953
3 changed files with 47 additions and 49 deletions
+7 -13
View File
@@ -54,20 +54,14 @@ async def get_user(user_id: str, conn: Optional[Connection] = None) -> Optional[
""",
(user_id,),
)
else:
return None
return (
User(
**{
**user,
**{
"extensions": [e[0] for e in extensions],
"wallets": [Wallet(**w) for w in wallets],
},
}
)
if user
else None
)
return User(
id = user['id'],
email = user['email'],
extensions = [e[0] for e in extensions],
wallets = [Wallet(**w) for w in wallets])
async def update_user_extension(