mirror of
https://github.com/Xevion/v1.xevion.dev.git
synced 2025-12-07 03:16:58 -06:00
fixed hidden url implementation finally
This commit is contained in:
@@ -89,21 +89,19 @@ def boolparse(string, default=False):
|
|||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@app.errorhandler(404)
|
@app.route('/hidden<id>/help')
|
||||||
def page_not_found(e):
|
|
||||||
return '404<br>${}'.format(app.config['HIDDEN_URL'])
|
|
||||||
|
|
||||||
hidden_url = app.config['HIDDEN_URL']
|
|
||||||
hidden_help_url = hidden_url + '/help'
|
|
||||||
|
|
||||||
@app.route(hidden_help_url)
|
|
||||||
@login_required
|
@login_required
|
||||||
def hidden_help():
|
def hidden_help(id):
|
||||||
|
if id != app.config['HIDDEN_URL']:
|
||||||
|
return 'bad id'
|
||||||
|
else:
|
||||||
return render_template('hidden_help.html')
|
return render_template('hidden_help.html')
|
||||||
|
|
||||||
@app.route(hidden_url)
|
@app.route('/hidden<id>')
|
||||||
@login_required
|
@login_required
|
||||||
def hidden():
|
def hidden(id):
|
||||||
|
if id != app.config['HIDDEN_URL']:
|
||||||
|
return 'bad id'
|
||||||
# Handled within request
|
# Handled within request
|
||||||
tags = request.args.get('tags') or 'trap'
|
tags = request.args.get('tags') or 'trap'
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user