import api from "../lib/axios";


export const getVehicles = async(filter) => {
    try {
        const endpoint = `/vehicles/${filter}`;
        const {data} = await api.get(endpoint);
        return data;
    } catch (error) {
        console.log(error);
        return null;
    }
}

export const saveProposal = async(formData) => {
    try {
        const endpoint = `/proposals`;
        const {data} = await api.post(endpoint, formData);
        return data;
    } catch (error) {
        console.log(error);
        return null;
    }
}