import axios from 'axios';

export const addSQLReport = async (formData) => {
  try {
    const token = localStorage.getItem('authToken');
    const response = await axios.post(
      `${process.env.REACT_APP_API_BASE_URL}/Rpt_builder2/Rpt_builder2`,
      formData,
      {
        headers: {
          'Content-Type': 'application/json',
          Authorization: `Bearer ${token}`
        }
      }
    );
    return response.data;
  } catch (error) {
    console.error('Error adding SQL report:', error);
    throw error;
  }
};

