diff --git a/src/dataService.ts b/src/dataService.ts index ca7c234..69a8873 100644 --- a/src/dataService.ts +++ b/src/dataService.ts @@ -128,7 +128,7 @@ export const fetchStock = async (): Promise => { 'Authorization': `Bearer ${token}` } }); - if (response.status === 401 || response.status === 403) { + if (response.status === 401) { logout(); return []; } @@ -171,7 +171,7 @@ export const fetchData = async (): Promise => { 'Authorization': `Bearer ${token}` } }); - if (response.status === 401 || response.status === 403) { + if (response.status === 401) { logout(); return []; } @@ -193,7 +193,10 @@ const authFetch = async (path: string, options: RequestInit = {}): Promise