chore: remove create journey
This commit is contained in:
parent
ba352d4edd
commit
2b4386c942
@ -79,28 +79,6 @@ def get_journey(journey_id):
|
||||
return jsonify(journey)
|
||||
return jsonify({'error': 'Journey not found'}), 404
|
||||
|
||||
@app.route('/api/journeys', methods=['POST'])
|
||||
def create_journey():
|
||||
"""Create a new journey."""
|
||||
data = request.get_json()
|
||||
|
||||
# Validate required fields
|
||||
if not data or 'name' not in data:
|
||||
return jsonify({'error': 'Journey name is required'}), 400
|
||||
|
||||
# Create new journey
|
||||
new_journey = {
|
||||
'id': data.get('id', str(len(journeys) + 1)),
|
||||
'name': data['name'],
|
||||
'description': data.get('description', ''),
|
||||
'markers': data.get('markers', []),
|
||||
'createdAt': datetime.now().isoformat()
|
||||
}
|
||||
|
||||
journeys.append(new_journey)
|
||||
save_journeys()
|
||||
|
||||
return jsonify(new_journey), 201
|
||||
|
||||
@app.route('/api/journeys/<string:journey_id>', methods=['PUT'])
|
||||
def update_journey(journey_id):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user