/** reportsService — Previously called the Python backend for report generation.
 *  Reports are now generated directly from Supabase queries in the AdminReports view. */
import { supabase } from '@/supabase';

export const reportsService = {
    async getRoutesReport() {
        const { data, error } = await supabase.from('routes').select('*')
        if (error) throw new Error(error.message)
        return data
    },

    async getUsersReport() {
        const { data, error } = await supabase.from('users').select('id, email, role, created_at, is_active')
        if (error) throw new Error(error.message)
        return data
    }
}
