fdsf
This commit is contained in:
parent
401faa2226
commit
cf71ca6b0e
1 changed files with 2 additions and 2 deletions
|
@ -896,12 +896,12 @@ def ban_user(user_id, v):
|
||||||
|
|
||||||
if 'reason' in request.args:
|
if 'reason' in request.args:
|
||||||
if reason.startswith("/post/"):
|
if reason.startswith("/post/"):
|
||||||
post = reason.split("/post/")[1].split("/")[0]
|
post = reason.split("/post/")[1]
|
||||||
post = get_post(post)
|
post = get_post(post)
|
||||||
post.bannedfor = True
|
post.bannedfor = True
|
||||||
g.db.add(post)
|
g.db.add(post)
|
||||||
elif reason.startswith("/comment/"):
|
elif reason.startswith("/comment/"):
|
||||||
comment = reason.split("/comment/")[1].split("/")[0]
|
comment = reason.split("/comment/")[1]
|
||||||
comment = get_comment(comment)
|
comment = get_comment(comment)
|
||||||
comment.bannedfor = True
|
comment.bannedfor = True
|
||||||
g.db.add(comment)
|
g.db.add(comment)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue