archives - add additional route for ease of use

pull/31/head
Aevann1 2022-11-29 05:08:26 +02:00
parent 53d5f40037
commit 261abe3161
1 changed files with 1 additions and 0 deletions

View File

@ -29,6 +29,7 @@ def subreddit(subreddit, v):
return redirect(f'https://{reddit}/r/{subreddit}')
@app.get("/reddit/<subreddit>/comments/<path:path>")
@app.get("/r/<subreddit>/comments/<path:path>")
@auth_desired
def reddit_post(subreddit, v, path):
post_id = path.rsplit("/", 1)[0].replace('/', '')