From 3d7eb850ecd3ad7802fb5bca391886fd437debd2 Mon Sep 17 00:00:00 2001 From: Ilia Mashkov Date: Tue, 31 Mar 2026 12:52:43 +0300 Subject: [PATCH] fix(auth): remove unnecessary token header setup --- src/features/auth/api/config/authApi/authApi.ts | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/features/auth/api/config/authApi/authApi.ts b/src/features/auth/api/config/authApi/authApi.ts index 5ea88b8..fd59cb1 100644 --- a/src/features/auth/api/config/authApi/authApi.ts +++ b/src/features/auth/api/config/authApi/authApi.ts @@ -2,17 +2,7 @@ import { api as baseApi, useTokenStore } from "shared/api"; export const authHttpClient = baseApi.extend({ hooks: { - beforeRequest: [ - (request) => { - const token = useTokenStore.getState().accessToken; - - if (token) { - request.headers.set("Authorization", `Bearer ${token}`); - } - - return request; - }, - ], + beforeRequest: [], afterResponse: [ async (request, options, response) => { if (response.status !== 401) {