gfgf
This commit is contained in:
parent
343634083e
commit
1a2188fbc1
2 changed files with 2 additions and 1 deletions
|
@ -15,6 +15,7 @@ from .clients import *
|
||||||
from files.__main__ import Base, cache
|
from files.__main__ import Base, cache
|
||||||
from files.helpers.security import *
|
from files.helpers.security import *
|
||||||
import random
|
import random
|
||||||
|
from os import environ
|
||||||
|
|
||||||
site = environ.get("DOMAIN").strip()
|
site = environ.get("DOMAIN").strip()
|
||||||
site_name = environ.get("SITE_NAME").strip()
|
site_name = environ.get("SITE_NAME").strip()
|
||||||
|
|
|
@ -31,7 +31,7 @@ def toggle_club(pid, v):
|
||||||
|
|
||||||
post = get_post(pid)
|
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
|
post.club = not post.club
|
||||||
g.db.add(post)
|
g.db.add(post)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue