From f41b09cc0705ae2a96bbf13c306eae8b9f507873 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 28 Oct 2022 22:13:58 +0200 Subject: [PATCH] small change to /admin/app --- files/classes/clients.py | 2 +- files/routes/oauth.py | 4 ++-- files/templates/admin/app.html | 13 +++++++++++++ files/templates/admin/apps.html | 9 +++++---- 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/files/classes/clients.py b/files/classes/clients.py index 755561551..2a9ef6280 100644 --- a/files/classes/clients.py +++ b/files/classes/clients.py @@ -33,7 +33,7 @@ class OauthApp(Base): @property @lazy def permalink(self): - return f"{SITE_FULL}/admin/app/{self.id}" + return f"{SITE_FULL}/admin/app/{self.id}/posts" @lazy def idlist(self, page=1): diff --git a/files/routes/oauth.py b/files/routes/oauth.py index 496d93c13..e1e6fe3ce 100644 --- a/files/routes/oauth.py +++ b/files/routes/oauth.py @@ -226,9 +226,9 @@ def admin_app_reject(v, aid): return {"message": f"'{app.app_name}' rejected!"} -@app.get("/admin/app/") +@app.get("/admin/app//posts") @admin_level_required(PERMS['APPS_MODERATION']) -def admin_app_id(v, aid): +def admin_app_id_posts(v, aid): aid=aid oauth = g.db.get(OauthApp, aid) if not oauth: abort(404) diff --git a/files/templates/admin/app.html b/files/templates/admin/app.html index 51eb12045..b8b2b7a70 100644 --- a/files/templates/admin/app.html +++ b/files/templates/admin/app.html @@ -47,6 +47,19 @@ + + {% if listing %} {% include "submission_listing.html" %} {% elif comments %} diff --git a/files/templates/admin/apps.html b/files/templates/admin/apps.html index d6f9d7145..e56047476 100644 --- a/files/templates/admin/apps.html +++ b/files/templates/admin/apps.html @@ -13,10 +13,11 @@ {% for app in apps %}
- -
+ + +