fix: initialize auth in RQ client

This commit is contained in:
Ali BARIN
2024-03-04 10:48:55 +00:00
parent 73bd90c555
commit 930843d065
4 changed files with 21 additions and 8 deletions

View File

@@ -33,11 +33,11 @@ export default function AutomatischQueryClientProvider({ children }) {
if (token) {
api.defaults.headers.Authorization = token;
initialize();
} else {
delete api.defaults.headers.Authorization;
}
initialize();
},
[initialize, token],
);