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

Add /student endpoints #5

Open
wants to merge 43 commits into
base: main
Choose a base branch
from
Open

Add /student endpoints #5

wants to merge 43 commits into from

Conversation

feverdreme
Copy link
Collaborator

@feverdreme feverdreme commented Nov 18, 2023

Summary

  • Add working fireStore for endpoints POST, PUT, GET, DELETE
  • Standardize error messages validating API requests
  • Put all /student API code in /src/routes/students/index.ts

Test Plan

  • Used postman to test API endpoints manually but eventually we will want some sort of API test suite.

Notes

  • Not all form validation is done, eg. email regex validation.
  • There should be fireStore collection instantiation code to make sure form fields are correct and so we can leverage fireStore validation tools as well.
  • Array updates are not implemented yet so student attributes such as food allergies are unsupported.
    • Allergies should be enums, and there should be a defined AllergyList class.
    • Leveraging of fireStore class implicit conversion should be used.
  • This is the first of many PRs for the /student endpoint. More is definitely needed before this is ready for the web.

backend/functions/src/routes/students/index.ts Outdated Show resolved Hide resolved
backend/functions/package.json Outdated Show resolved Hide resolved
backend/functions/src/routes/students/index.ts Outdated Show resolved Hide resolved
backend/functions/src/routes/students/index.ts Outdated Show resolved Hide resolved
backend/functions/src/routes/students/index.ts Outdated Show resolved Hide resolved
backend/functions/src/routes/students/index.ts Outdated Show resolved Hide resolved
backend/functions/src/routes/students/index.ts Outdated Show resolved Hide resolved
backend/functions/src/index.ts Outdated Show resolved Hide resolved
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.

2 participants