mirror of
https://github.com/directus/directus.git
synced 2026-01-30 14:18:11 -05:00
Pause api queue when refreshing auth (#8827)
This commit is contained in:
@@ -37,7 +37,13 @@ export const onRequest = (config: AxiosRequestConfig): Promise<RequestConfig> =>
|
||||
};
|
||||
|
||||
return new Promise((resolve) => {
|
||||
queue.add(() => resolve(requestConfig));
|
||||
if (config.url && config.url === '/auth/refresh') {
|
||||
queue.pause();
|
||||
resolve(requestConfig);
|
||||
queue.start();
|
||||
} else {
|
||||
queue.add(() => resolve(requestConfig));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user