big money
This commit is contained in:
parent
58a3f37241
commit
e2d4d9d016
3 changed files with 21 additions and 16 deletions
|
@ -214,8 +214,7 @@ def api_comment(v):
|
|||
process_image(filename, 200)
|
||||
requests.post(f'https://api.cloudflare.com/client/v4/zones/{CF_ZONE}/purge_cache', headers=CF_HEADERS, data={'files': [f"https://{request.host}/static/assets/images/badges/{badge.id}.webp"]})
|
||||
except Exception as e:
|
||||
print(e)
|
||||
return {"error": "You didn't follow the format retard"}, 400
|
||||
return {"error": e}, 400
|
||||
elif v.admin_level > 2 and parent_post.id == 37838:
|
||||
try:
|
||||
marsey = loads(body.lower())
|
||||
|
@ -232,8 +231,7 @@ def api_comment(v):
|
|||
requests.post(f'https://api.cloudflare.com/client/v4/zones/{CF_ZONE}/purge_cache', headers=CF_HEADERS, data={'files': [f"https://{request.host}/static/assets/images/emojis/{name}.webp"]})
|
||||
cache.delete_memoized(marsey_list)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
return {"error": "You didn't follow the format retard"}, 400
|
||||
return {"error": e}, 400
|
||||
body += f"\n\n"
|
||||
elif file.content_type.startswith('video/'):
|
||||
file.save("video.mp4")
|
||||
|
@ -568,9 +566,6 @@ def api_comment(v):
|
|||
v.comment_count = g.db.query(Comment.id).filter(Comment.author_id == v.id, Comment.parent_submission != None).filter_by(is_banned=False, deleted_utc=0).count()
|
||||
g.db.add(v)
|
||||
|
||||
parent_post.comment_count += 1
|
||||
g.db.add(parent_post)
|
||||
|
||||
c.voted = 1
|
||||
|
||||
if v.id == PIZZASHILL_ID:
|
||||
|
@ -603,6 +598,10 @@ def api_comment(v):
|
|||
treasure = Treasure(g)
|
||||
treasure.check_for_treasure(body, c)
|
||||
|
||||
if not c.slots_result and not c.blackjack_result:
|
||||
parent_post.comment_count += 1
|
||||
g.db.add(parent_post)
|
||||
|
||||
g.db.commit()
|
||||
|
||||
if request.headers.get("Authorization"): return c.json
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue