From 20e6a937ef787a184d70ba9071e3302fe956a3d9 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 7 Nov 2021 22:31:36 +0200 Subject: [PATCH] gfgf --- files/classes/user.py | 1 + files/routes/posts.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/files/classes/user.py b/files/classes/user.py index b29da7189..66bb3da4e 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -15,6 +15,7 @@ from .clients import * from files.__main__ import Base, cache from files.helpers.security import * import random +from os import environ site = environ.get("DOMAIN").strip() site_name = environ.get("SITE_NAME").strip() diff --git a/files/routes/posts.py b/files/routes/posts.py index 547892d61..a82ed2612 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -31,7 +31,7 @@ def toggle_club(pid, v): post = get_post(pid) - if post.author_id != v.id or v.admin_level == 0: abort(403) + if post.author_id != v.id and v.admin_level == 0: abort(403) post.club = not post.club g.db.add(post)