1. Sign UP β
2. Login β
3. Book a car β
4. Find car based on id (non booked) β
5. for a user show cars he has booked β
4. Find non booked car based on id β
5. show cars user has booked β
npm install
Request body
{
"username":"john doe",
"email":"johndoe@gmail.com",
"password":"*********",
"password2":"*********"
}
Request body
{
"username":"john doe",
"email":"johndoe@gmail.com"
}
Response
[
{
"isRented": true,
"_id": "5fa43f11515cbe0e2800e31f",
"model": "mini cooper xv15",
"price": 1650000,
"year": 2011,
"creationDate": 1604599569298,
"__v": 0
}
]
## Book car by ID
### POST /cars/booking
Request body
{ "carId" : "mini cooper xv15", "rentalDate": "{% now 'iso-8601', 'dd mm yy' %}", "rentalDays":11 }
## Get booking for current User
### GET /booking
Request body
{ id : 'user id' }
## Add cars
## POST /AddCar
Request body
{ "model": "xuv500 AT509", "price": 2450000, "year": 2012, "creationDate": 5604599569232, }
Request body
{
"carId" : "mini cooper xv15",
"rentalDate": "{% now 'iso-8601', 'dd mm yy' %}",
"rentalDays":11
}
Request body
{
id : 'user id'
}
Request body
{
"model": "xuv500 AT509",
"price": 2450000,
"year": 2012,
"creationDate": 5604599569232,
}