I terrify myself

This commit is contained in:
2025-09-26 10:40:12 -04:00
parent 71025ab4a2
commit 966e14797a

View File

@@ -8,7 +8,7 @@ def populate_webhook_lookup():
lookup = {} lookup = {}
with open("lookup.txt", "r") as file: with open("lookup.txt", "r") as file:
for line in file: for line in file:
split_line = line.split(",") split_line = line.rstrip().split(",")
lookup[split_line[0]]= split_line[1] lookup[split_line[0]]= split_line[1]
return lookup return lookup
@@ -52,6 +52,7 @@ def convert(uuid):
webhook = lookup.get(uuid) webhook = lookup.get(uuid)
print(lookup) print(lookup)
ghost_payload = request.get_json() ghost_payload = request.get_json()
print(ghost_payload)
discord_payload = convert_ghost_to_discord(ghost_payload) discord_payload = convert_ghost_to_discord(ghost_payload)
httpx.post(webhook, data=discord_payload) httpx.post(webhook, data=discord_payload)