fix(auth): enhance user login response handling and update User schema
- Log the response data on successful login for debugging purposes - Improve error handling in user service by using safeParse for login response validation - Update User schema to allow null values for optional fields, enhancing flexibility in user data handling
This commit is contained in:
@@ -19,7 +19,8 @@ export const useLoginQuery = (callback?: () => void) => {
|
||||
mutationFn: userService.login,
|
||||
onSuccess: (response) => {
|
||||
setAuthState(response.data);
|
||||
router.replace("/charts");
|
||||
console.log(response);
|
||||
|
||||
if (callback) {
|
||||
callback();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user