it prints
This commit is contained in:
@@ -1,17 +1,4 @@
|
||||
import json
|
||||
from flask import Blueprint
|
||||
bp = Blueprint('main', __name__)
|
||||
@bp.route('/get_pairing_keys')
|
||||
def get_pairing_keys():
|
||||
"""Return all pairing keys as JSON for client selection."""
|
||||
keys_path = os.path.join(current_app.instance_path, 'pairing_keys.json')
|
||||
try:
|
||||
with open(keys_path, 'r') as f:
|
||||
keys = json.load(f)
|
||||
except Exception as e:
|
||||
print(f"Error loading pairing keys: {e}")
|
||||
return jsonify({'success': False, 'error': str(e), 'pairing_keys': []}), 500
|
||||
return jsonify({'success': True, 'pairing_keys': keys})
|
||||
import os
|
||||
import mariadb
|
||||
from datetime import datetime, timedelta
|
||||
@@ -61,6 +48,21 @@ def format_cell_data(cell):
|
||||
def store_articles():
|
||||
return render_template('store_articles.html')
|
||||
|
||||
@bp.route('/get_pairing_keys')
|
||||
def get_pairing_keys():
|
||||
"""Return all pairing keys as JSON for client selection."""
|
||||
keys_path = os.path.join(current_app.instance_path, 'pairing_keys.json')
|
||||
try:
|
||||
if os.path.exists(keys_path):
|
||||
with open(keys_path, 'r') as f:
|
||||
keys = json.load(f)
|
||||
else:
|
||||
keys = []
|
||||
except Exception as e:
|
||||
print(f"Error loading pairing keys: {e}")
|
||||
return jsonify([]), 200
|
||||
return jsonify(keys)
|
||||
|
||||
@bp.route('/warehouse_reports')
|
||||
def warehouse_reports():
|
||||
return render_template('warehouse_reports.html')
|
||||
|
||||
Reference in New Issue
Block a user