Redirect to correct Twitch stream
This commit is contained in:
parent
1ed23c2635
commit
22a68f3e9f
1 changed files with 4 additions and 2 deletions
|
|
@ -101,11 +101,13 @@ async def api_authenticate_service(service_id):
|
|||
async def api_create_donation():
|
||||
"""Takes data from donation form and creates+returns SatsPay charge"""
|
||||
webhook_base = request.scheme + "://" + request.headers["Host"]
|
||||
charge_details = await get_charge_details(g.data["service"])
|
||||
service_id = g.data["service"]
|
||||
service = await get_service(service_id)
|
||||
charge_details = await get_charge_details(service.id)
|
||||
name = g.data.get("name", "Anonymous")
|
||||
charge = await create_charge(
|
||||
amount=g.data["sats"],
|
||||
completelink="https://twitch.tv/Fitti",
|
||||
completelink=f"https://twitch.tv/{service.twitchuser}",
|
||||
completelinktext="Back to Stream!",
|
||||
webhook=webhook_base + "/twitchalerts/api/v1/postdonation",
|
||||
**charge_details)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue