fix: modification visuel du frontend au niveau du formulaire de contact pour qu'il s'armonise avec le css global.
fix : update du backend avec ajout de la suppression d'un projet.
This commit is contained in:
parent
ef1ba911d9
commit
542e00482b
9 changed files with 68 additions and 15 deletions
|
|
@ -45,4 +45,14 @@ def create_project():
|
|||
data['id'] = new_id
|
||||
|
||||
added = add_entry(PROJECTS_FILE, data)
|
||||
return jsonify(added), 201
|
||||
return jsonify(added), 201
|
||||
|
||||
@projects_bp.route('/<project_id>', methods=['DELETE'])
|
||||
def delete_project(project_id):
|
||||
projects = load_data(PROJECTS_FILE)
|
||||
project = next((p for p in projects if str(p.get('id')) == project_id), None)
|
||||
|
||||
if project:
|
||||
deleted = delete_entry(PROJECTS_FILE, project_id)
|
||||
return jsonify(deleted), 200
|
||||
return jsonify({"error": "Project not found"}), 404
|
||||
Loading…
Add table
Add a link
Reference in a new issue