mirror of
https://github.com/skylanix/MamieHenriette.git
synced 2026-02-12 11:20:38 +01:00
Accueil restructuré (zones Discord/Twitch, stats, indicateur connexion) + Top 3 sanctions/modérateurs + BOT_STATUS dans config Flask
This commit is contained in:
@@ -1,6 +1,16 @@
|
||||
from flask import render_template
|
||||
from webapp import webapp
|
||||
from database.models import ModerationEvent
|
||||
|
||||
@webapp.route("/")
|
||||
def index():
|
||||
return render_template("index.html")
|
||||
status = webapp.config["BOT_STATUS"]
|
||||
sanctions_count = ModerationEvent.query.count()
|
||||
return render_template(
|
||||
"index.html",
|
||||
discord_connected=status["discord_connected"],
|
||||
discord_guild_count=status["discord_guild_count"],
|
||||
sanctions_count=sanctions_count,
|
||||
twitch_connected=status["twitch_connected"],
|
||||
twitch_channel_name=status["twitch_channel_name"],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user