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

Fetch Reservation by Student and Menu #3

Merged
merged 3 commits into from
Nov 15, 2024

Conversation

macielti
Copy link
Owner

This pull request introduces a new feature to fetch a student's reservation by menu ID, along with related test cases and HTTP endpoints. Here are the most important changes:

New Functionality:

  • Added fetch-student-reservation-by-menu function in src/rango_graalvm/controllers/reservation.clj to handle fetching reservations by student code and menu ID.
  • Added fetch-student-reservation-by-menu function in src/rango_graalvm/db/postgresql/reservation.clj to query the database for reservations by student ID and menu ID.

HTTP Endpoints:

  • Added a new API endpoint /api/reservation-by-student-and-menu in src/rango_graalvm/diplomat/http_server.clj to handle HTTP GET requests for fetching reservations by student and menu.
  • Implemented the controller function for the new endpoint in src/rango_graalvm/diplomat/http_server/reservation.clj.

Testing:

  • Added a new test function fetch-student-reservation-by-menu-test in test/integration/reservation_test.clj to test the new functionality.
  • Added a helper function fetch-student-reservation-by-menu in test/integration/aux/http.clj to facilitate the testing process.
  • Renamed test/integration/retract_reservation_test.clj to test/integration/reservation_test.clj to better reflect the expanded scope of the tests.

@macielti macielti self-assigned this Nov 15, 2024
@macielti macielti merged commit df60d05 into main Nov 15, 2024
2 checks passed
@macielti macielti deleted the fetch-student-reservation-by-menu branch November 15, 2024 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant