forked from rDrama/rDrama
dffd
parent
35cb331f5a
commit
7b648de549
|
@ -44,15 +44,13 @@ def get_user(username, v=None, graceful=False):
|
|||
|
||||
return user
|
||||
|
||||
def get_account(id, v=None, graceful=False):
|
||||
def get_account(id, v=None):
|
||||
|
||||
user = g.db.query(User).filter(User.id == id).first()
|
||||
|
||||
if not user:
|
||||
if not graceful:
|
||||
abort(404)
|
||||
else:
|
||||
return None
|
||||
user = g.db.query(User).filter(User.id == int(id, 36)).first()
|
||||
if not user: abort(404)
|
||||
|
||||
if v:
|
||||
block = g.db.query(UserBlock).filter(
|
||||
|
|
|
@ -333,7 +333,7 @@ def api_comment(v):
|
|||
|
||||
for alt in v.alts:
|
||||
if not alt.is_suspended:
|
||||
alt.ban(reason="Spamming.")
|
||||
alt.ban(reason="Spamming.". days=1)
|
||||
|
||||
for comment in similar_comments:
|
||||
comment.is_banned = True
|
||||
|
|
|
@ -742,7 +742,7 @@ def submit_post(v):
|
|||
|
||||
for alt in v.alts:
|
||||
if not alt.is_suspended:
|
||||
alt.ban(reason="Spamming.")
|
||||
alt.ban(reason="Spamming.", days=1)
|
||||
|
||||
for post in similar_posts + similar_urls:
|
||||
post.is_banned = True
|
||||
|
|
Loading…
Reference in New Issue