import type { AxiosRequestConfig } from "axios"; import { getToken } from "@/entities/auth/lib/token-manager"; import { CLAIM_NAME } from "@/shared/config"; export function withAuthHeader(config: T = {} as T): T { const authorization = getToken(CLAIM_NAME); if (!authorization) return config; return { ...config, headers: { ...config.headers, [CLAIM_NAME]: authorization, }, }; }