forked from rDrama/rDrama
routes: added various per-app exclusions (#128)
Kindly, Why (at least on WPD): * /marseys results in a 500 (balls-deep) * /worldcup... and /directory are empty pages * /toggle_holes results in almost all posts getting removed from the front page in the perspective of the logged-in user Thanks, granny Reviewed-on: rDrama/rDrama#128 Co-authored-by: mummified-corroding-granny <mummified-corroding-granny@noreply.fsdfsd.net> Co-committed-by: mummified-corroding-granny <mummified-corroding-granny@noreply.fsdfsd.net>master
parent
6f06b24ead
commit
4e52488b35
|
@ -82,6 +82,9 @@ def _special_leaderboard_get():
|
||||||
@app.get('/special/worldcup2022/leaderboard')
|
@app.get('/special/worldcup2022/leaderboard')
|
||||||
@auth_required
|
@auth_required
|
||||||
def get_leaderboard(v):
|
def get_leaderboard(v):
|
||||||
|
if SITE_NAME != 'rDrama':
|
||||||
|
abort(404)
|
||||||
|
|
||||||
result = _special_leaderboard_get()
|
result = _special_leaderboard_get()
|
||||||
if g.is_api_or_xhr: return result
|
if g.is_api_or_xhr: return result
|
||||||
users = get_accounts_dict([r[0] for r in result],
|
users = get_accounts_dict([r[0] for r in result],
|
||||||
|
|
|
@ -43,6 +43,9 @@ def reddit_post(subreddit, v, path):
|
||||||
@auth_required
|
@auth_required
|
||||||
def marseys(v:User):
|
def marseys(v:User):
|
||||||
|
|
||||||
|
if SITE_NAME != 'rDrama':
|
||||||
|
abort(404)
|
||||||
|
|
||||||
marseys = get_marseys(g.db)
|
marseys = get_marseys(g.db)
|
||||||
authors = get_accounts_dict([m.author_id for m in marseys], v=v, graceful=True, include_shadowbanned=False)
|
authors = get_accounts_dict([m.author_id for m in marseys], v=v, graceful=True, include_shadowbanned=False)
|
||||||
original = os.listdir("/asset_submissions/marseys/original")
|
original = os.listdir("/asset_submissions/marseys/original")
|
||||||
|
@ -198,6 +201,9 @@ def log_item(id, v):
|
||||||
@limiter.limit(DEFAULT_RATELIMIT, key_func=get_ID)
|
@limiter.limit(DEFAULT_RATELIMIT, key_func=get_ID)
|
||||||
@auth_required
|
@auth_required
|
||||||
def static_megathread_index(v:User):
|
def static_megathread_index(v:User):
|
||||||
|
if SITE_NAME != 'rDrama':
|
||||||
|
abort(404)
|
||||||
|
|
||||||
return render_template("megathread_index.html", v=v)
|
return render_template("megathread_index.html", v=v)
|
||||||
|
|
||||||
@app.get("/api")
|
@app.get("/api")
|
||||||
|
|
|
@ -1234,6 +1234,9 @@ def toggle_pins(sort):
|
||||||
|
|
||||||
@app.get("/toggle_holes")
|
@app.get("/toggle_holes")
|
||||||
def toggle_holes():
|
def toggle_holes():
|
||||||
|
if SITE_NAME == 'WPD':
|
||||||
|
abort(404)
|
||||||
|
|
||||||
holes = session.get('holes', True)
|
holes = session.get('holes', True)
|
||||||
session["holes"] = not holes
|
session["holes"] = not holes
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue