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

export const avicultureNewRequest = createAsyncThunk(
  "AVICULTURE_NEW_REQUEST",
  async (d) => {
    try {
      const { data, status } = await axios.post("Poultry_Request/", d);
      return { data, status };
    } catch (e) {
      return { error: e.response.data.result };
    }
  }
);
