what
This commit is contained in:
parent
8e8cce0ac5
commit
38b7abca48
1 changed files with 3 additions and 5 deletions
|
@ -394,16 +394,14 @@ def viewmore(v, pid, sort, offset):
|
||||||
else: offset += 1
|
else: offset += 1
|
||||||
comments = comments2
|
comments = comments2
|
||||||
|
|
||||||
return render_template("comments.html", v=v, comments=comments, ids=list(ids), render_replies=True, p=post, pid=pid, sort=sort, offset=offset, ajax=True)
|
return render_template("comments.html", v=v, comments=comments, ids=list(ids), render_replies=True, pid=pid, sort=sort, offset=offset, ajax=True)
|
||||||
|
|
||||||
|
|
||||||
@app.get("/morecomments/<cid>")
|
@app.get("/morecomments/<cid>")
|
||||||
@limiter.limit("1/second;30/minute;200/hour;1000/day")
|
@limiter.limit("1/second;30/minute;200/hour;1000/day")
|
||||||
@auth_desired
|
@auth_desired
|
||||||
def morecomments(v, cid):
|
def morecomments(v, cid):
|
||||||
top_comment = g.db.query(Comment).filter_by(id=cid).one_or_none()
|
tcid = g.db.query(Comment.top_comment_id).filter_by(id=cid).one_or_none()[0]
|
||||||
p = top_comment.post
|
|
||||||
tcid = top_comment.id
|
|
||||||
|
|
||||||
if v:
|
if v:
|
||||||
votes = g.db.query(CommentVote).filter_by(user_id=v.id).subquery()
|
votes = g.db.query(CommentVote).filter_by(user_id=v.id).subquery()
|
||||||
|
@ -445,7 +443,7 @@ def morecomments(v, cid):
|
||||||
c = g.db.query(Comment).filter_by(id=cid).one_or_none()
|
c = g.db.query(Comment).filter_by(id=cid).one_or_none()
|
||||||
comments = c.replies
|
comments = c.replies
|
||||||
|
|
||||||
return render_template("comments.html", v=v, comments=comments, p=p, render_replies=True, ajax=True)
|
return render_template("comments.html", v=v, comments=comments, render_replies=True, ajax=True)
|
||||||
|
|
||||||
@app.post("/edit_post/<pid>")
|
@app.post("/edit_post/<pid>")
|
||||||
@limiter.limit("1/second;30/minute;200/hour;1000/day")
|
@limiter.limit("1/second;30/minute;200/hour;1000/day")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue