text: import axios from 'axios';
  
  let cars = [
      {
          'id': 1,
          'mark': 'opel',
          'model': 'corsa',
          'plate': 'KR 4F51'
      },
      {
          'id': 2,
          'mark': 'fiat',
          'model': 'punto',
          'plate': 'KR 4451'
      },
  ];
  
  export const GetAllCars = (cb) => {
      axios.get('http://localhost:8121/cars')
      .then(response => {
          cb(response.data);
      })
      .catch(error => {
          cb(null)
      });
  }
  
  export const GetCarById = (id, cb) => {
      axios.get(`http://localhost:8121/cars/${id}`)
      .then(response => {
          cb(response.data)
      })
      .catch(error => {
          cb(null)
      });
  }