gf
This commit is contained in:
parent
4a924d4675
commit
974a16a2d8
3 changed files with 7 additions and 28 deletions
|
@ -181,32 +181,10 @@ def post_id(pid, anything=None, v=None):
|
|||
|
||||
post.preloaded_comments = [x for x in comments if not (x.author and x.author.shadowbanned) or (v and v.id == x.author_id)]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
read = session["read_comments"]
|
||||
read_comments = [x.id for x in post.preloaded_comments]
|
||||
if session.get("read_comments"): session["read_comments"] += read_comments
|
||||
else: session["read_comments"] = read_comments
|
||||
|
||||
|
||||
post.views += 1
|
||||
|
@ -220,7 +198,7 @@ def post_id(pid, anything=None, v=None):
|
|||
post.tree_comments()
|
||||
|
||||
if request.headers.get("Authorization"): return post.json
|
||||
else: return post.rendered_page(v=v, sort=sort)
|
||||
else: return post.rendered_page(v=v, read, sort=sort)
|
||||
|
||||
|
||||
@app.post("/edit_post/<pid>")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue