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

export const getStewardTransactions = createAsyncThunk(
  "AVICULTURE_REQUESTS_SERVICE",
  async (d) => {
    const { data, status } = await axios.get(
      "https://amait.mrkiani.ir/api/report/transactions/",
      {
        params: {
          shop: d.key,
          datefrom: d.datefrom,
          dateto: d.dateto,
          page: d.page,
          mode: d.mode,
        },
      }
    );
    return { data, status };
  }
);
