Get discovered Bluetooth devices
()
| 12650 | else: |
| 12651 | return jsonify({'error': 'No session selected'}), 400 |
| 12652 | |
| 12653 | result = session.backfill_gps_from_track() |
| 12654 | return jsonify({ |
| 12655 | 'session_id': session.session_id, |
| 12656 | 'backfilled': result |
| 12657 | }) |
| 12658 | except Exception as e: |
| 12659 | logger.error(f"Wardriving backfill error: {e}") |
| 12660 | return jsonify({'error': str(e)}), 500 |
| 12661 | |
| 12662 | |
| 12663 | @app.route('/api/wardriving/device_name', methods=['POST']) |
| 12664 | def wardriving_set_device_name(): |
| 12665 | """Set device name for wardriving sessions.""" |
| 12666 | try: |
| 12667 | data = request.get_json(silent=True) or {} |
| 12668 | name = data.get('name', '').strip()[:64] # Max 64 chars |
| 12669 | shared_data.config['wardriving_device_name'] = name |
| 12670 | shared_data.save_config() |
nothing calls this directly
no test coverage detected