AhmedYasser155 / CS160_Group4_Uber

0 stars 3 forks source link

API Request Handlers #59

Closed bryanttpham closed 2 years ago

bryanttpham commented 2 years ago

Create an API (hopefully restful) that we can reuse to allow customers to communicate with the backend of our application.

POST - create new users GET - fetch users from the data base from features like profile and ratings PUT - allow users to change documents in the database ex. ratings DELETE- allow users to delete their account.

bryanttpham commented 2 years ago

Completed all the handlers for the most common API requests listed above

bryanttpham commented 2 years ago

Postman Test Cases: API Endpoints:

Get a user by its Mongodb id image

Mongodb Test Cases

Test database connection:

  1. Created a new rider with a unique phone number, email
  2. Created a new driver with a unique phone number, email, license Testing Unique Constraints: (each unique attribute were tested seperately)
  3. Attempted to create a new rider with a non-unique phone number and email.
  4. Attempted to create a new driver with a non-unique phone number and email.