fsd
This commit is contained in:
parent
a12d87c358
commit
035d37b134
12 changed files with 49 additions and 40 deletions
|
@ -26,8 +26,12 @@ CF_HEADERS = {"Authorization": f"Bearer {CF_KEY}", "Content-Type": "application/
|
|||
@app.get("/post/<pid>/<anything>/<cid>")
|
||||
@app.get("/logged_out/comment/<cid>")
|
||||
@app.get("/logged_out/post/<pid>/<anything>/<cid>")
|
||||
@app.get("/s/<sub>/comment/<cid>")
|
||||
@app.get("/s/<sub>/post/<pid>/<anything>/<cid>")
|
||||
@app.get("/logged_out/s/<sub>/comment/<cid>")
|
||||
@app.get("/logged_out/s/<sub>/post/<pid>/<anything>/<cid>")
|
||||
@auth_desired
|
||||
def post_pid_comment_cid(cid, pid=None, anything=None, v=None):
|
||||
def post_pid_comment_cid(cid, pid=None, anything=None, v=None, sub=None):
|
||||
|
||||
if not v and not request.path.startswith('/logged_out'): return redirect(f"{SITE_FULL}/logged_out{request.full_path}")
|
||||
|
||||
|
@ -127,7 +131,7 @@ def post_pid_comment_cid(cid, pid=None, anything=None, v=None):
|
|||
else:
|
||||
if post.is_banned and not (v and (v.admin_level > 1 or post.author_id == v.id)): template = "submission_banned.html"
|
||||
else: template = "submission.html"
|
||||
return render_template(template, v=v, p=post, sort=sort, comment_info=comment_info, render_replies=True, hole=post.hole)
|
||||
return render_template(template, v=v, p=post, sort=sort, comment_info=comment_info, render_replies=True, sub=post.sub)
|
||||
|
||||
@app.post("/comment")
|
||||
@limiter.limit("1/second;20/minute;200/hour;1000/day")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue