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

export const slaughterGetBroadcastManagementService = createAsyncThunk(
  "SLAUGHTER_GET_BROADCAST_MANAGEMENT_SERVICE",
  async (id) => {
    const { data, status } = await axios.get("steward/", {
      params: {
        date: id,
        role: getRoleFromUrl(),
      },
    });
    return { data, status };
  }
);
