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

export const inspectorGetKillHousesService = createAsyncThunk(
  "INSPECTOR_GET_KILL_HOUSES",
  async () => {
    const { data, status } = await axios.get(
      `kill_house/?role=${getRoleFromUrl()}`
    );
    return { data, status };
  }
);
