This commit is contained in:
Aevann1 2021-12-19 15:11:05 +02:00
parent 81d048bce1
commit d48c132fb5

View file

@ -223,8 +223,8 @@ def post_id(pid, anything=None, v=None):
g.db.commit() g.db.commit()
if request.headers.get("Authorization"): return post.json if request.headers.get("Authorization"): return post.json
else: else:
if post.is_banned and not (v and (v.admin_level > 1 or post.author_id == v.id)): template = "{template2}submission_banned.html" if post.is_banned and not (v and (v.admin_level > 1 or post.author_id == v.id)): template = f"{template2}submission_banned.html"
else: template = "{template2}submission.html" else: template = f"{template2}submission.html"
return render_template(template, v=v, p=post, sort=sort, render_replies=True, offset=offset) return render_template(template, v=v, p=post, sort=sort, render_replies=True, offset=offset)
@app.post("/viewmore/<pid>/<sort>/<offset>") @app.post("/viewmore/<pid>/<sort>/<offset>")