import CONFIG from "../../core/сonfig.jsx";

const loginUser = async (loginData, api) => {
    const response = await api.post(`${CONFIG.BASE_URL}/login/`, loginData, {
        withCredentials: true,
        headers: {
            'Content-Type': 'application/json'
        }
    });

    return response.data.access_token;
};

export default loginUser;