import apiService from '../APIRequestService/APIService';


export const deleteReportSQL = async (id) => {
    if (!id) {
        throw new Error("ID is required for deletion.");
    }
    const BASE_URL = `${process.env.REACT_APP_API_URL}Rpt_builder2/Rpt_builder2/${id}`;
    try {
        const response = await apiService.delete(BASE_URL);
        console.log("Delete response:", response.data);
        return response.data;
    } catch (error) {
        console.error("Error in API call:", error.response || error.message);
        throw error;
    }
};
