fix: login api route
This commit is contained in:
@@ -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));
|
||||||
|
|||||||
Reference in New Issue
Block a user