diff --git a/webapp/titanembeds/blueprints/embed/embed.py b/webapp/titanembeds/blueprints/embed/embed.py index dbb373b..30ddf76 100644 --- a/webapp/titanembeds/blueprints/embed/embed.py +++ b/webapp/titanembeds/blueprints/embed/embed.py @@ -24,9 +24,15 @@ def get_logingreeting(): def guild_embed(guild_id): if check_guild_existance(guild_id): guild = db.session.query(Guilds).filter(Guilds.guild_id == guild_id).first() + guild_dict = { + "id": guild.guild_id, + "name": guild.name, + "unauth_users": guild.unauth_users, + "icon": guild.icon + } return render_template("embed.html.j2", login_greeting=get_logingreeting(), - guild_id=guild_id, guild=guild, + guild_id=guild_id, guild=guild_dict, generate_guild_icon=generate_guild_icon_url, unauth_enabled=guild_query_unauth_users_bool(guild_id), client_id=config['client-id'] diff --git a/webapp/titanembeds/blueprints/user/user.py b/webapp/titanembeds/blueprints/user/user.py index 8181b95..022e765 100644 --- a/webapp/titanembeds/blueprints/user/user.py +++ b/webapp/titanembeds/blueprints/user/user.py @@ -88,8 +88,13 @@ def administrate_guild(guild_id): all_members = db.session.query(UnauthenticatedUsers).filter(UnauthenticatedUsers.guild_id == guild_id).order_by(UnauthenticatedUsers.last_timestamp).all() all_bans = db.session.query(UnauthenticatedBans).filter(UnauthenticatedBans.guild_id == guild_id).all() users = prepare_guild_members_list(all_members, all_bans) - dbguild_dict = {"unauth_users": db_guild.unauth_users} - return render_template("administrate_guild.html.j2", guild=db_guild, dbguild=dbguild_dict, members=users, permissions=permissions) + dbguild_dict = { + "id": db_guild.guild_id, + "name": db_guild.name, + "unauth_users": db_guild.unauth_users, + "icon": db_guild.icon + } + return render_template("administrate_guild.html.j2", guild=dbguild_dict, members=users, permissions=permissions) @user.route("/administrate_guild/", methods=["POST"]) @discord_users_only() diff --git a/webapp/titanembeds/templates/administrate_guild.html.j2 b/webapp/titanembeds/templates/administrate_guild.html.j2 index 5821d2a..2c8c265 100644 --- a/webapp/titanembeds/templates/administrate_guild.html.j2 +++ b/webapp/titanembeds/templates/administrate_guild.html.j2 @@ -42,7 +42,7 @@
diff --git a/webapp/titanembeds/templates/embed.html.j2 b/webapp/titanembeds/templates/embed.html.j2 index 05f8188..115e8cb 100644 --- a/webapp/titanembeds/templates/embed.html.j2 +++ b/webapp/titanembeds/templates/embed.html.j2 @@ -10,7 +10,7 @@ - {{ guild.name }} - Embed - Titan Embeds for Discord + {{ guild['name'] }} - Embed - Titan Embeds for Discord {% include 'google_analytics.html.j2' %} @@ -32,16 +32,16 @@