Skip to content

Commit

Permalink
refactor: return api response at the end
Browse files Browse the repository at this point in the history
  • Loading branch information
jsun969 committed Sep 28, 2024
1 parent 7d315e4 commit 2060c70
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,7 @@ def get_course(id: str):

try:
CourseSchema.model_validate(response)
return response
except ValidationError as e:
raise HTTPException(status_code=501, detail=e.errors())

# return response
return response

0 comments on commit 2060c70

Please sign in to comment.