diff --git a/files/routes/admin.py b/files/routes/admin.py index 4cda98a59..6cb807f1f 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -20,19 +20,6 @@ from files.helpers.discord import add_role SITE_NAME = environ.get("SITE_NAME", "").strip() -@app.get("/wtf") -@admin_level_required(6) -def wtf(v): - reason = "Did you ever hear the tragedy of Darth Plagueis The Wise? I thought not. It’s not a story the Jedi would tell you. It’s a Sith legend. Darth Plagueis was a Dark Lord of the Sith, so powerful and so wise he could use the Force to influence the midichlorians to create life… He had such a knowledge of the dark side that he could even keep the ones he cared about from dying. The dark side of the Force is a pathway to many abilities some consider to be unnatural. He became so powerful… the only thing he was afraid of was losing his power, which eventually, of course, he did. Unfortunately, he taught his apprentice everything he knew, then his apprentice killed him in his sleep. Ironic. He could save others from death, but not himself." - flag = Flag(post_id=8128, - user_id=1, - reason=reason, - ) - g.db.add(flag) - g.db.commit() - return "sex" - - @app.get("/truescore") @admin_level_required(6) def truescore(v): diff --git a/files/routes/posts.py b/files/routes/posts.py index aeb21a1e9..3d6d6661a 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -385,8 +385,9 @@ def filter_title(title): title = title.replace(f':!{emoji}:', f':!{emoji}:') elif path.isfile(f'./files/assets/images/emojis/{emoji}.webp'): title = title.replace(f':{emoji}:', f':{emoji}:') - - return title + + if len(title) > 500: abort(400) + else: return title