- getAllCars() url: 'http://localhost:3050/api/cars'.
- getAllCarById(2) url: 'http://localhost:3050/api/cars/2'.
- addCar(car) url: 'http://localhost:3050/api/cars'.
POST
http verb. - editCar(car) url: 'http://localhost:3050/api/car/:car.car_id'.
PUT
http verb.
//There was a line (84) with a typo in cars.js inside the server folder
//(express req.params are casted as strings and car_id is a number so strict comparison didn't work)
-(item) => item.car_id === req.params.id
+(item) => item.car_id === +req.params.id
-
deleteCar(carId) url: 'http://localhost:3050/api/car/:carId'.
DELETE
http verb.- All requests were made using axios + fetch as extra (with the special usage of await).