Admin: Kachel 'Fotos freizugeben' + pending_fotos in Stats-API, SW by-v365

This commit is contained in:
rene 2026-04-25 09:44:17 +02:00
parent 034f7ef21f
commit b608d5635f
3 changed files with 11 additions and 1 deletions

View file

@ -185,6 +185,14 @@ async def stats(user=Depends(require_mod)):
ki_cloud_today = ki_local_today = ki_luna_today = 0
ki_cloud_month = ki_local_month = ki_luna_month = 0
# Ausstehende Wiki-Foto-Einreichungen
try:
pending_fotos = conn.execute(
"SELECT COUNT(*) FROM wiki_foto_submissions WHERE status='pending'"
).fetchone()[0]
except Exception:
pending_fotos = 0
# Social Media Tracking
try:
social_total = conn.execute("SELECT COUNT(*) FROM social_content").fetchone()[0]
@ -225,6 +233,7 @@ async def stats(user=Depends(require_mod)):
"threads": threads,
"posts": posts,
"open_reports": open_reports,
"pending_fotos": pending_fotos,
"banned": banned,
"dogs_total": dogs_total,
"poison_active": poison_total,