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


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

export const editCompany = async(companyId, formData) => {
    try {
        const endpoint = `/companies/${companyId}`;
        const {data} = await api.patch(endpoint, formData);
        return data;
    } catch (error) {
        console.log(error);
        return null;
    }
}