RESTORE CACHE
This commit is contained in:
parent
a3dc329a79
commit
fe25f41fad
8 changed files with 78 additions and 38 deletions
|
@ -114,10 +114,18 @@ def submit_get(v, sub=None):
|
|||
|
||||
@app.get("/post/<pid>")
|
||||
@app.get("/post/<pid>/<anything>")
|
||||
@app.get("/logged_out/post/<pid>")
|
||||
@app.get("/logged_out/post/<pid>/<anything>")
|
||||
@app.get("/h/<sub>/post/<pid>")
|
||||
@app.get("/h/<sub>/post/<pid>/<anything>")
|
||||
@app.get("/logged_out/h/<sub>/post/<pid>")
|
||||
@app.get("/logged_out/h/<sub>/post/<pid>/<anything>")
|
||||
@auth_desired
|
||||
def post_id(pid, anything=None, v=None, sub=None):
|
||||
if not v and not request.path.startswith('/logged_out') and not request.headers.get("Authorization"):
|
||||
return redirect(f"/logged_out{request.full_path}")
|
||||
|
||||
if v and request.path.startswith('/logged_out'): v = None
|
||||
|
||||
try: pid = int(pid)
|
||||
except Exception as e: pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue