Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get specific education by index #26

Closed
Closed
Changes from all 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
impl get specific education
  • Loading branch information
16BitNarwhal committed Oct 2, 2024
commit dcfbad53acb2ed09fea786a2e2ebd8f4ba3e3e82
4 changes: 4 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ def education():
Handles education requests
'''
if request.method == 'GET':
index = request.args.get('index', type=int)
if index is not None and 0 <= index < len(data['education']):
return jsonify(data['education'][index])

return jsonify({})

if request.method == 'POST':
Expand Down
Loading