forked from rDrama/rDrama
1
0
Fork 0

wpd 2000 chars

master
Aevann 2024-02-29 15:42:03 +02:00
parent f5416a84b1
commit 2736c90d8e
1 changed files with 5 additions and 2 deletions

View File

@ -2129,8 +2129,11 @@ def mark_effortpost(pid, v):
if p.effortpost:
abort(400, "Post is already marked as an effortpost!")
if len(p.body) < 3000:
abort(403, "Effortposts need to be 3000+ characters!")
if SITE_NAME == 'WPD': min_chars = 2000
else: min_chars = 3000
if len(p.body) < min_chars:
abort(403, f"Effortposts need to be {min_chars}+ characters!")
p.effortpost = True
g.db.add(p)