Skip to content

Create a backend endpoint to search students by name #31

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

Merged
merged 14 commits into from
May 2, 2025

Conversation

arelymartinez16
Copy link
Collaborator

What type of PR is this? (check all applicable)

  • ♻️ Refactor
  • ✨ Feature
  • 🐛 Bug Fix
  • 👷 Optimization
  • 📝 Documentation Update
  • 🔖 Release
  • 🚩 Other

Description

This PR adds a backend endpoint GET /api/students that supports optional query parameters name and email for filtering students by partial matches. If no parameters are provided, it returns all students.

Related Tickets & Documents

Fixes #25

Mobile & Desktop Screenshots/Recordings

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help

Added to documentation?

  • 📜 readme
  • 📜 contributing.md
  • 📓 docs
  • 📕 storybook
  • 🙅 no documentation needed

[optional] Are there any post-deployment tasks we need to perform?

[optional] What gif best describes this PR or how it makes you feel?

Copy link
Collaborator

@afranco07 afranco07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few minor comments.

Can you also add tests for this? I think I set up a test database that you can use, so you should be able to add students to it in a beforeAll and do a clean up afterAll

@arelymartinez16
Copy link
Collaborator Author

I had to comment out one line of code in the Meeting model because the test cases were failing.

Copy link
Collaborator

@afranco07 afranco07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes are looking good! Just left a couple comments about moving database setup and teardown and then it should be good to go

@arelymartinez16 arelymartinez16 requested a review from afranco07 May 1, 2025 21:59
Copy link
Collaborator

@afranco07 afranco07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect! Thank you!

@afranco07 afranco07 merged commit 7b879a7 into main May 2, 2025
2 checks passed
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.

Create backend endpoint for searching for students
2 participants