fix: login api route

This commit is contained in:
karishmas6
2024-09-25 13:45:37 +05:30
parent 68a153b358
commit ba4695acb0

View File

@@ -40,7 +40,7 @@ const Login = () => {
e.preventDefault(); e.preventDefault();
setLoading(true); setLoading(true);
try { try {
const { data } = await axios.post(`/api/login`, { email, password }); const { data } = await axios.post(`http://localhost:8080/auth/login`, { email, password });
dispatch({ type: 'LOGIN', payload: data }); dispatch({ type: 'LOGIN', payload: data });
notify('success', 'Welcome to Maxun!'); notify('success', 'Welcome to Maxun!');
window.localStorage.setItem('user', JSON.stringify(data)); window.localStorage.setItem('user', JSON.stringify(data));