Skip to content

Latest commit

 

History

History
51 lines (37 loc) · 2.76 KB

File metadata and controls

51 lines (37 loc) · 2.76 KB

Car-Rental-API

Car Rental Company has many cars of the same model type and the user can book the car of a particular model depending on availability of that car model. Authentication is required to update, delete and add the cars in the database.

How to Run

  1. Clone the repo
  2. Goto that directory
  3. run command npm install
  4. run command npm run start

Creating the user:
image

Add the new car:
Step1) Login to get token
image

The token is put into the Authorization header to serve the update request.
Step2) Add the car
image

Issue the particular car to the user:
image

Number of Bookings of the car is updated and stock is updated when the issue is submitted:
image

The return status of the issue is changed when the id put in URL and returned date is today’s date:
image

Number of Bookings of the car is updated and stock is updated when the car is returned:
image

GET the Car Rentals history for user:
image

GET all car rentals history:
image

GET particular car rental history by its id:
image

Update the car details when the bookings are not there:
The token is put into the Authorization header to serve this request.
image

Delete the card details when the bookings are not there:
The token is put into the Authorization header to serve the delete request.
image

GET all User details:
image