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

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