forked from rDrama/rDrama
vcxvcx
parent
247caf8683
commit
c073e79300
|
@ -159,10 +159,10 @@ def api_comment(v):
|
||||||
if parent_post.id == 37749:
|
if parent_post.id == 37749:
|
||||||
with open(f"snappy_{SITE_NAME}.txt", "a") as f:
|
with open(f"snappy_{SITE_NAME}.txt", "a") as f:
|
||||||
f.write('\n{[para]}\n' + body)
|
f.write('\n{[para]}\n' + body)
|
||||||
elif request.files["file"]:
|
elif request.files.get("file"):
|
||||||
if parent_post.id == 37833:
|
if parent_post.id == 37833:
|
||||||
try: badge_body = loads(body)
|
try: badge_body = loads(body)
|
||||||
except: return {"error": "You didn't follow the format retard"}
|
except: return {"error": "You didn't follow the format retard"}, 500
|
||||||
badge_number = str(len(listdir('files/assets/images/badges'))+1)
|
badge_number = str(len(listdir('files/assets/images/badges'))+1)
|
||||||
with open("badges.json", 'r') as f: badges = loads(f.read())
|
with open("badges.json", 'r') as f: badges = loads(f.read())
|
||||||
badges[badge_number] = badge_body
|
badges[badge_number] = badge_body
|
||||||
|
@ -171,9 +171,7 @@ def api_comment(v):
|
||||||
marsey_dict = list(loads(body).items())
|
marsey_dict = list(loads(body).items())
|
||||||
marsey_key = marsey_dict[0][0]
|
marsey_key = marsey_dict[0][0]
|
||||||
marsey_body = marsey_dict[0][1]
|
marsey_body = marsey_dict[0][1]
|
||||||
except Exception as e:
|
except Exception as e: return {"error": "You didn't follow the format retard"}, 400
|
||||||
print(e, flush=True)
|
|
||||||
return {"error": "You didn't follow the format retard"}
|
|
||||||
with open("marsey_list.json", 'r') as f: marsey_list = loads(f.read())
|
with open("marsey_list.json", 'r') as f: marsey_list = loads(f.read())
|
||||||
marsey_list[marsey_key] = marsey_body
|
marsey_list[marsey_key] = marsey_body
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue