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:
AmirReza Jamali
2026-02-10 16:49:19 +03:30
parent cb6a48a6e6
commit 7755384d51
3 changed files with 21 additions and 16 deletions
+2 -1
View File
@@ -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();
}