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

export const getMessagesService = createAsyncThunk(
  "GET_MESSAGES",
  async (d, { dispatch }) => {
    const { data, status } = await axios.get(`message/`, {
      params: {
        ticket: d.ticket,
      },
    });
    return { data, status };
  }
);
