From 09cba22ba9ef6d0aec79d37d47ca5f97fa5155f0 Mon Sep 17 00:00:00 2001 From: axel Date: Wed, 2 Oct 2024 12:44:14 -0700 Subject: [PATCH] Implement API route to return all Experiences updated --- app.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app.py b/app.py index 82eeed0..d832380 100644 --- a/app.py +++ b/app.py @@ -45,9 +45,7 @@ def experience(): Handle experience requests ''' if request.method == 'GET': - experiences = {} - for idx, exp in enumerate(data['experience']): - experiences[str(idx)] = exp.__dict__ + experiences = [exp.__dict__ for exp in data['experience']] return jsonify(experiences) if request.method == 'POST':