mirror of
				https://github.com/TitanEmbeds/Titan.git
				synced 2025-11-04 07:47:10 +01:00 
			
		
		
		
	Fix admin panel guild cards and allow sorting by guildid
This commit is contained in:
		@@ -256,7 +256,17 @@ def update_administrate_guild(guild_id):
 | 
			
		||||
@admin.route("/guilds")
 | 
			
		||||
@is_admin
 | 
			
		||||
def guilds():
 | 
			
		||||
    guilds = db.session.query(Guilds).all()
 | 
			
		||||
    guilds = []
 | 
			
		||||
    dbguilds = db.session.query(Guilds).all()
 | 
			
		||||
    for guild in dbguilds:
 | 
			
		||||
        rguild = redisqueue.get_guild(guild.guild_id)
 | 
			
		||||
        if not rguild:
 | 
			
		||||
            continue
 | 
			
		||||
        guilds.append({
 | 
			
		||||
            "guild_id": guild.guild_id,
 | 
			
		||||
            "name": rguild["name"],
 | 
			
		||||
            "icon": rguild["icon"]
 | 
			
		||||
        })
 | 
			
		||||
    return render_template("admin_guilds.html.j2", servers=guilds, icon_generate=generate_guild_icon_url)
 | 
			
		||||
 | 
			
		||||
@admin.route("/tokens", methods=["GET"])
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user