Add trip history and route replay
Co-authored-by: Copilot <[email protected]>
This commit is contained in:
@@ -28,6 +28,21 @@ def dtc():
|
||||
def dash():
|
||||
return render_template('dash.html', account = account, car = car)
|
||||
|
||||
@app.route('/history')
|
||||
def history():
|
||||
return render_template('history.html', account=account, car=car)
|
||||
|
||||
@app.route('/api/trips')
|
||||
def trips():
|
||||
return jsonify({"trips": app_sql.list_trips()})
|
||||
|
||||
@app.route('/api/trip/<int:trip_id>')
|
||||
def trip_route(trip_id):
|
||||
trip = app_sql.get_trip_route(trip_id)
|
||||
if trip is None:
|
||||
return jsonify(error=f"Trip not found: {trip_id}"), 404
|
||||
return jsonify(trip)
|
||||
|
||||
@app.route('/api/dash/devices')
|
||||
def dash_devices():
|
||||
devices = app_dash.list_usb_storage_partitions()
|
||||
|
||||
Reference in New Issue
Block a user