fix: guest route

This commit is contained in:
Tristan Yang
2023-08-04 09:37:45 +08:00
parent 34dcb8d3af
commit dbb1338cbe
3 changed files with 17 additions and 7 deletions
+5 -2
View File
@@ -93,13 +93,16 @@ export const authApi = createApi({
method: "POST",
body: data
}),
// extraOptions:{
// maxRetries: 3
// },
async onQueryStarted(params, { dispatch, queryFulfilled }) {
try {
const { data } = await queryFulfilled;
dispatch(updateToken(data));
} catch {
} catch (error) {
// dispatch(resetAuthData());
console.error("renew token error");
console.error("renew token error from rtk", error);
}
}
}),