fd
This commit is contained in:
parent
cf2221c056
commit
3e0b3ed94c
1 changed files with 2 additions and 10 deletions
|
@ -876,16 +876,8 @@ def toggle_comment_pin(cid, v):
|
||||||
)
|
)
|
||||||
g.db.add(ma)
|
g.db.add(ma)
|
||||||
|
|
||||||
html=render_template(
|
if comment.is_pinned: return {"message": "Comment pinned!"}
|
||||||
"comments.html",
|
else: return {"message": "Comment unpinned!"}
|
||||||
v=v,
|
|
||||||
comments=[comment],
|
|
||||||
render_replies=False,
|
|
||||||
)
|
|
||||||
|
|
||||||
html=str(BeautifulSoup(html, features="html.parser").find(id=f"comment-{comment.id}-only"))
|
|
||||||
|
|
||||||
return html
|
|
||||||
|
|
||||||
|
|
||||||
@app.post("/save_comment/<cid>")
|
@app.post("/save_comment/<cid>")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue