Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

from dataclasses import asdict
from flask import Flask, jsonify, request
from models import Experience, Education, Skill

from models import Education, Experience, Skill

app = Flask(__name__)

Expand Down Expand Up @@ -83,6 +84,29 @@ def education():
return jsonify({})


@app.route("/resume/education/<int:education_id>", methods=["GET"])
def get_education(education_id):
'''
Handles retrieving specific education
'''
existing_education_records = data["education"]
if education_id > len(existing_education_records) - 1 :
return jsonify(
{
"message": "education does not exist",
}
), 404

record = existing_education_records[education_id]
return jsonify(
{
"message": "education record returned successfully",
"data": record,
}
), 200



@app.route("/resume/skill", methods=["POST"])
def skill():
json_data = request.json
Expand Down
Loading