From 11c248076400011acd15ff73448750a76775788f Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 22 Aug 2021 15:10:05 +0200 Subject: [PATCH] fdfd --- files/routes/admin.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/files/routes/admin.py b/files/routes/admin.py index 6623cbce05..974e07da5a 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -20,6 +20,15 @@ from files.__main__ import app, cache from .front import frontlist from files.helpers.discord import add_role +@app.get("/admin/comment_count") +@admin_level_required(3) +def comment_count(v): + for p in g.db.query(Submission).options(lazyload('*')).all(): + p.comment_count = len(p.comments) + g.db.add(p) + return "sex" + + @app.get("/admin/shadowbanned") @auth_required def shadowbanned(v):