Skip to content

Commit

Permalink
[#94]Fix: edit useMyInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
Xoeon committed Nov 25, 2023
1 parent 17b0b12 commit 3a6fc74
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/modules/apis/Auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ export const useMyInfo = () => {
headers: {
Authorization: `Bearer ${token}`,
},
}).then((res) => res.data.data),
})
.then((res) => res.json())
.then((data) => data.data),
onError: (error) => {
return `An error has occurred: ${error.message}`;
},
Expand Down

0 comments on commit 3a6fc74

Please sign in to comment.