Skip to content

Commit eed0bf1

Browse files
authored
Merge pull request #27 from olad5/get-specific-education
feat: retrieve specific education
2 parents 8eb22c4 + 5948887 commit eed0bf1

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

app.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,29 @@ def education():
168168
return jsonify({})
169169

170170

171+
@app.route("/resume/education/<int:education_id>", methods=["GET"])
172+
def get_education(education_id):
173+
'''
174+
Handles retrieving specific education
175+
'''
176+
existing_education_records = data["education"]
177+
if education_id > len(existing_education_records) - 1 :
178+
return jsonify(
179+
{
180+
"message": "education does not exist",
181+
}
182+
), 404
183+
184+
record = existing_education_records[education_id]
185+
return jsonify(
186+
{
187+
"message": "education record returned successfully",
188+
"data": record,
189+
}
190+
), 200
191+
192+
193+
171194
@app.route("/resume/skill", methods=["POST"])
172195
def skill():
173196
json_data = request.json

0 commit comments

Comments
 (0)