cvxcvx
This commit is contained in:
parent
32e3f5018f
commit
f59d4e6f11
7 changed files with 23 additions and 14 deletions
|
@ -172,7 +172,7 @@ def api_comment(v):
|
|||
marsey_body = marsey_dict[0][1]
|
||||
marsey_body["count"] = 0
|
||||
except: return {"error": "You didn't follow the format retard"}, 400
|
||||
with open("marseys.json", 'r') as f: marseys = loads(f.read().replace("'",'"'))
|
||||
marseys = cache.get("marseys")
|
||||
marseys[marsey_key] = marsey_body
|
||||
|
||||
if v.marseyawarded:
|
||||
|
@ -212,7 +212,7 @@ def api_comment(v):
|
|||
elif v.id in (CARP_ID,AEVANN_ID) and parent_post.id == 37838:
|
||||
filename = f'files/assets/images/emojis/{marsey_key}.webp'
|
||||
process_image(file, filename, 200)
|
||||
with open('marseys.json', 'w') as f: dump(marseys, f)
|
||||
cache.set("marseys", marseys)
|
||||
elif file.content_type.startswith('video/'):
|
||||
file.save("video.mp4")
|
||||
with open("video.mp4", 'rb') as f:
|
||||
|
@ -860,4 +860,4 @@ def unsave_comment(cid, v):
|
|||
g.db.delete(save)
|
||||
g.db.commit()
|
||||
|
||||
return {"message": "Comment unsaved!"}
|
||||
return {"message": "Comment unsaved!"}
|
Loading…
Add table
Add a link
Reference in a new issue