2025-04-01 20:28:04 +05:30
|
|
|
import apiService from '../APIRequestService/APIService';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export const deleteReportSQL = async (id) => {
|
|
|
|
|
if (!id) {
|
|
|
|
|
throw new Error("ID is required for deletion.");
|
|
|
|
|
}
|
2025-05-28 16:33:02 +05:30
|
|
|
<<<<<<< HEAD
|
2025-04-01 20:28:04 +05:30
|
|
|
const BASE_URL = `${process.env.REACT_APP_API_URL}/Rpt_builder2/Rpt_builder2/${id}`;
|
2025-05-28 16:33:02 +05:30
|
|
|
=======
|
|
|
|
|
const BASE_URL = `${process.env.REACT_APP_API_URL}Rpt_builder2/Rpt_builder2/${id}`;
|
|
|
|
|
>>>>>>> 1c0592d (commit new code)
|
2025-04-01 20:28:04 +05:30
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
};
|