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

export const provinceGetCars = createAsyncThunk(
  "PROVINCE_GET_CARS",
  async () => {
    const { data, status } = await axios.get("kill_house_driver/", {
      params: {
        role: getRoleFromUrl(),
        ...data,
      },
    });
    return { data, status };
  }
);
