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

export const adminGetHatchingByPeriod = createAsyncThunk(
  "ADMIN_GET_HATCHING_BY_PERIOD",
  async (dataObject) => {
    const { data, status } = await axios.get(
      "forcast_hatching/?date1=" +
        dataObject.date1 +
        "&date2=" +
        dataObject.date2 +
        "&day=" +
        dataObject.age
    );
    return { data, status };
  }
);
