From 01151de87f5e9478497228e9d16a16c21a70a544 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sat, 22 Jul 2023 22:34:16 +0300 Subject: [PATCH] do this https://rdrama.net/post/18459/marseycapywalking-megathread-for-bugs-and-suggestions/4619404#context --- files/routes/posts.py | 5 +---- files/templates/post_actions.html | 5 +---- files/templates/post_actions_mobile.html | 5 +---- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/files/routes/posts.py b/files/routes/posts.py index c48ab801e..76274d371 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -61,10 +61,7 @@ def publish(pid, v): execute_snappy(p, v) - if is_site_url(request.referrer): - return redirect(request.referrer) - - return redirect(p.permalink) + return {"message": "Post has been published successfully!"} @app.get("/submit") @app.get("/h//submit") diff --git a/files/templates/post_actions.html b/files/templates/post_actions.html index ff29fd89f..621666ea5 100644 --- a/files/templates/post_actions.html +++ b/files/templates/post_actions.html @@ -1,8 +1,5 @@ {% if v and v.id==p.author_id and p.private %} -
- - -
+ {% endif %} diff --git a/files/templates/post_actions_mobile.html b/files/templates/post_actions_mobile.html index 7270976e5..0e6ec6f7d 100644 --- a/files/templates/post_actions_mobile.html +++ b/files/templates/post_actions_mobile.html @@ -1,8 +1,5 @@ {% if v and v.id==p.author_id and p.private %} -
- - -
+ {% endif %}