fixxed flask blueprint names
This commit is contained in:
+4
-4
@@ -11,7 +11,7 @@ def admin():
|
||||
return render_template('admin.html', configs=configs)
|
||||
|
||||
|
||||
@app.route('/edit/<filename>', methods=['GET', 'POST'])
|
||||
@admin_bp.route('/edit/<filename>', methods=['GET', 'POST'])
|
||||
def admin_edit_config(filename):
|
||||
path = os.path.join(app.config['CONFIG_DIR'], filename)
|
||||
|
||||
@@ -52,7 +52,7 @@ def admin_edit_config(filename):
|
||||
return render_template('admin_edit.html', filename=filename, content=content)
|
||||
pass
|
||||
|
||||
@app.route('/delete/<filename>', methods=['POST'])
|
||||
@admin_bp.route('/delete/<filename>', methods=['POST'])
|
||||
def admin_delete_config(filename):
|
||||
path = os.path.join(app.config['CONFIG_DIR'], filename)
|
||||
if os.path.exists(path):
|
||||
@@ -66,8 +66,8 @@ def admin_delete_config(filename):
|
||||
return jsonify({"success": False, "message": "Datei nicht gefunden"}), 404
|
||||
pass
|
||||
|
||||
@app.route('/logs')
|
||||
@app.route('/logs/<date>')
|
||||
@admin_bp.route('/logs')
|
||||
@admin_bp.route('/logs/<date>')
|
||||
def admin_logs(date=None):
|
||||
if date is None:
|
||||
date = datetime.now().strftime('%d')
|
||||
|
||||
Reference in New Issue
Block a user