From 1ed23c2635f8df432b3e623e0ea87ceb7ae1030c Mon Sep 17 00:00:00 2001 From: Fitti Date: Thu, 24 Jun 2021 10:20:38 +0200 Subject: [PATCH] Fix not awaiting get_service --- lnbits/extensions/twitchalerts/crud.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lnbits/extensions/twitchalerts/crud.py b/lnbits/extensions/twitchalerts/crud.py index 15b05063..cc35c0be 100644 --- a/lnbits/extensions/twitchalerts/crud.py +++ b/lnbits/extensions/twitchalerts/crud.py @@ -19,7 +19,7 @@ async def get_charge_details(service_id): "description": f"TwitchAlerts donation for service {str(service_id)}", "time": 1440, } - service = get_service(service_id) + service = await get_service(service_id) wallet_id = service.wallet wallet = await get_wallet(wallet_id) user = wallet.user @@ -186,7 +186,7 @@ async def authenticate_service(service_id, code, redirect_uri): async def service_add_token(service_id, token): if (await get_service(service_id)).authenticated: return False - db.execute( + await db.execute( "UPDATE Services SET authenticated = 1, token = ? where id = ?", (token, service_id,), )