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

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