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

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