Clear ZAP session data
()
| 18137 | return jsonify({'roles': roles}) |
| 18138 | except Exception as e: |
| 18139 | logger.error(f"Wardriving companion_role error: {e}") |
| 18140 | return jsonify({'error': str(e)}), 500 |
| 18141 | |
| 18142 | @app.route('/api/wardriving/track') |
| 18143 | def wardriving_track(): |
| 18144 | """Get GPS track for current session (for map display).""" |
| 18145 | try: |
| 18146 | engine = _get_wardriving_engine() |
| 18147 | session_id = request.args.get('session_id') |
| 18148 | if session_id and (not engine.session or engine.session.session_id != session_id): |
| 18149 | from wardriving import WardrivingSession |
| 18150 | session = WardrivingSession(engine.data_dir, session_id=session_id) |
| 18151 | elif engine.session: |
| 18152 | session = engine.session |
| 18153 | else: |
| 18154 | return jsonify({'track': []}) |
| 18155 | return jsonify({'track': session.get_gps_track()}) |
| 18156 | except Exception as e: |
| 18157 | return jsonify({'error': str(e)}), 500 |
| 18158 | |
| 18159 | @app.route('/api/wardriving/interfaces') |
nothing calls this directly
no test coverage detected