forked from rDrama/rDrama
master
parent
17b3b155b6
commit
dedfd6a370
|
@ -164,7 +164,7 @@ def api_comment(v):
|
||||||
|
|
||||||
body = request.values.get("body", "").strip()[:10000]
|
body = request.values.get("body", "").strip()[:10000]
|
||||||
|
|
||||||
if v.admin_level == 3 and parent_post.id == 37749:
|
if v.admin_level > 1 and parent_post.id == 37749:
|
||||||
with open(f"snappy_{SITE_NAME}.txt", "a", encoding="utf-8") as f:
|
with open(f"snappy_{SITE_NAME}.txt", "a", encoding="utf-8") as f:
|
||||||
f.write('\n{[para]}\n' + body)
|
f.write('\n{[para]}\n' + body)
|
||||||
|
|
||||||
|
@ -198,7 +198,7 @@ def api_comment(v):
|
||||||
file.save(oldname)
|
file.save(oldname)
|
||||||
image = process_image(oldname)
|
image = process_image(oldname)
|
||||||
if image == "": return {"error":"Image upload failed"}
|
if image == "": return {"error":"Image upload failed"}
|
||||||
if v.admin_level == 3:
|
if v.admin_level > 2:
|
||||||
if parent_post.id == 37696:
|
if parent_post.id == 37696:
|
||||||
filename = 'files/assets/images/Drama/sidebar/' + str(len(listdir('files/assets/images/Drama/sidebar'))+1) + '.webp'
|
filename = 'files/assets/images/Drama/sidebar/' + str(len(listdir('files/assets/images/Drama/sidebar'))+1) + '.webp'
|
||||||
copyfile(oldname, filename)
|
copyfile(oldname, filename)
|
||||||
|
|
Loading…
Reference in New Issue