import recordAxiosInstance from "@/shared/services/recordAxiosInstance";
import Cookies from "js-cookie";
import { withHeaders } from "./withHeaders";

export const fetchAttachment = async (recordId: string): Promise<any> => {
  try {
    const { data } = await recordAxiosInstance.get(
      `records-attachments/${recordId}`,
      {
        headers: withHeaders(),
      }
    );

    return data;
  } catch (error) {
    throw error;
  }
};
