{
"id":"24uobf24jlgb",
"make":"Tesla",
"model":"X",
"range":{
"unit":"km",
"distance":"450"
},
"colors":[
"red",
"black"
],
"price":"110000 EUR",
"photo":"https://car.com/car.jpg"
}
- /cars --> get action retrieves all the cars.
- /cars --> post action create a car with given attributes. (you can see the necessary details from the example above)
- /cars/:id --> get action retrieves specified cars by the id.
- /cars/search --> get action retrieves the cars depending on the
make
params given andorder
param isobligatory
- Right now we are just accepting the EURO values.
- You can create the car without specifiying the currency or with currency but not contiguous to price.
- No error handling applied.
- JUST CHECKED THE REPO AGAIN AND THOUGHT ADDING VALIDATION IS A GOOD IDEA SO ADDED THEM IN 07.04.2022