fix(phase26): add Pi trip deletion (BUG-08)
This commit is contained in:
@@ -146,6 +146,13 @@ def trip_route(trip_id):
|
||||
return jsonify(error=f"Trip not found: {trip_id}"), 404
|
||||
return jsonify(trip)
|
||||
|
||||
@app.route('/api/trip/<int:trip_id>', methods=['DELETE'])
|
||||
def delete_trip(trip_id):
|
||||
deleted = app_sql.delete_trip(trip_id)
|
||||
if not deleted:
|
||||
return jsonify(error=f"Trip not found: {trip_id}"), 404
|
||||
return jsonify(status="deleted"), 200
|
||||
|
||||
import functools
|
||||
import urllib.request
|
||||
|
||||
|
||||
Reference in New Issue
Block a user