modified: app.py
modified: templates/user_giveaways.html
This commit is contained in:
7
app.py
7
app.py
@@ -510,10 +510,15 @@ def user_giveaways(guild_id):
|
||||
""", (user_id, guild_id))
|
||||
won_giveaways = cursor.fetchall()
|
||||
|
||||
# Hole den Servernamen aus der guilds-Tabelle
|
||||
cursor.execute("SELECT name FROM guilds WHERE guild_id = %s", (guild_id,))
|
||||
guild_name_result = cursor.fetchone()
|
||||
guild_name = guild_name_result["name"] if guild_name_result else f"Server {guild_id}"
|
||||
|
||||
cursor.close()
|
||||
connection.close()
|
||||
|
||||
return render_template("user_giveaways.html", won_giveaways=won_giveaways, guild_id=guild_id)
|
||||
return render_template("user_giveaways.html", won_giveaways=won_giveaways, guild_id=guild_id, guild_name=guild_name)
|
||||
|
||||
return redirect(url_for("landing_page"))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user