fddf
This commit is contained in:
parent
1d5da292dd
commit
4d7e2e0a3c
2 changed files with 14 additions and 5 deletions
|
@ -183,11 +183,14 @@ def frontlist(v=None, sort="hot", page=1,t="all", ids_only=True, filter_words=''
|
|||
return posts, next_exists
|
||||
|
||||
@app.get("/")
|
||||
@app.get("/logged_out")
|
||||
@auth_desired
|
||||
def front_all(v):
|
||||
|
||||
if v and v.is_banned and not v.unban_utc: return render_template("seized.html")
|
||||
|
||||
if not v and request.path == "/": return redirect("/logged_out")
|
||||
|
||||
try: page = int(request.args.get("page") or 1)
|
||||
except: abort(400)
|
||||
|
||||
|
|
|
@ -491,6 +491,9 @@ def archiveorg(url):
|
|||
@app.route("/embed/post/<pid>", methods=["GET"])
|
||||
def embed_post_pid(pid):
|
||||
|
||||
try: pid = int(pid)
|
||||
except: abort(400)
|
||||
|
||||
post = get_post(pid)
|
||||
|
||||
return render_template("embeds/post.html", p=post)
|
||||
|
@ -499,6 +502,9 @@ def embed_post_pid(pid):
|
|||
@app.route("/embed/comment/<cid>", methods=["GET"])
|
||||
def embed_comment_cid(cid, pid=None):
|
||||
|
||||
try: cid = int(cid)
|
||||
except: abort(400)
|
||||
|
||||
comment = get_comment(cid)
|
||||
|
||||
return render_template("embeds/comment.html", c=comment)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue