import { createAsyncThunk } from "@reduxjs/toolkit";
import axios from "axios";

export const slaughterGetCars = createAsyncThunk(
  "SLAUGHTER_GET_CARS_SERVICE",
  async (d) => {
    const parmObj = d
      ? {
          key: d.id,
          kill_house_key: d.killHouseKey,
          kill_request_key: d.killRequestKey,
        }
      : {};
    const { data, status } = await axios.get("kill_house_add_car/", {
      params: parmObj,
    });
    return { data, status };
  }
);
