mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-19 20:29:17 +00:00
chore: code cleanup
This commit is contained in:
@@ -84,11 +84,11 @@ const useAuth = () => {
|
||||
};
|
||||
}, [user]);
|
||||
|
||||
const handleLogin = async user => {
|
||||
const handleLogin = async userData => {
|
||||
setLoading(true);
|
||||
|
||||
try {
|
||||
const { data } = await api.post("/auth/login", user);
|
||||
const { data } = await api.post("/auth/login", userData);
|
||||
localStorage.setItem("token", JSON.stringify(data.token));
|
||||
api.defaults.headers.Authorization = `Bearer ${data.token}`;
|
||||
setUser(data.user);
|
||||
|
||||
Reference in New Issue
Block a user