fdfd
parent
a633a43ef9
commit
d0d609cc9c
|
@ -76,7 +76,6 @@ def submit_get(v):
|
||||||
@app.get("/post/<pid>/<anything>")
|
@app.get("/post/<pid>/<anything>")
|
||||||
@app.get("/api/v1/post/<pid>")
|
@app.get("/api/v1/post/<pid>")
|
||||||
@auth_desired
|
@auth_desired
|
||||||
@public("read")
|
|
||||||
def post_base36id(pid, anything=None, v=None):
|
def post_base36id(pid, anything=None, v=None):
|
||||||
try: pid = int(pid)
|
try: pid = int(pid)
|
||||||
except Exception as e: pass
|
except Exception as e: pass
|
||||||
|
@ -240,10 +239,8 @@ def post_base36id(pid, anything=None, v=None):
|
||||||
|
|
||||||
post.tree_comments()
|
post.tree_comments()
|
||||||
|
|
||||||
return {
|
if "api" in request.path: return post.json
|
||||||
"html":lambda:post.rendered_page(v=v, sort=sort),
|
else: return post.rendered_page(v=v, sort=sort)
|
||||||
"api":lambda:jsonify(post.json)
|
|
||||||
}
|
|
||||||
|
|
||||||
@app.post("/edit_post/<pid>")
|
@app.post("/edit_post/<pid>")
|
||||||
@is_not_banned
|
@is_not_banned
|
||||||
|
|
Loading…
Reference in New Issue