fix: pre-release review — frames dir, wigle config GET, debug redis-keys endpoint

CRITICAL:
- frames.py: FRAMES_DIR corrected to /tmp/adacam/pics
- frames.py: graceful handling when capture not started

IMPORTANT:
- wigle.py: added GET /api/1/wigle/config endpoint for the companion app
- app.py: added GET /api/1/debug/redis-keys endpoint for GPS troubleshooting
- install.sh: removed python validation that runs from wrong directory
This commit is contained in:
Sulkta 2026-03-14 17:59:08 -07:00
parent 70b677b802
commit 75a8321014
4 changed files with 57 additions and 8 deletions

View file

@ -91,9 +91,28 @@ def wigle_stats():
return jsonify({'error': str(e), 'total_networks': 0, 'uploaded_networks': 0, 'pending_upload': 0, 'scans_today': 0})
@bp.route('/config', methods=['GET'])
def get_wigle_config():
"""Get WiGLE configuration (unauthenticated, tokens masked)."""
try:
conn = _get_db()
cfg = _get_config(conn)
conn.close()
return jsonify({
'enabled': cfg.get('enabled', '0') == '1',
'api_name': cfg.get('api_name', ''),
'api_token_set': bool(cfg.get('api_token')),
'scan_interval_seconds': int(cfg.get('scan_interval_seconds', '30')),
'upload_interval_seconds': int(cfg.get('upload_interval_seconds', '300')),
})
except Exception as e:
return jsonify({'error': str(e)}), 500
@bp.route('/config', methods=['POST'])
@require_auth
def wigle_config():
def set_wigle_config():
"""Set WiGLE configuration (authenticated)."""
data = request.get_json() or {}