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

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