v1.0.92 fix usetoken in makerequest

This commit is contained in:
Nastya 2025-05-10 23:02:25 +03:00
parent b4258a0d46
commit ebaaf06166

@ -24,7 +24,7 @@ export async function makeRequest<TRequest = unknown, TResponse = unknown>({
withCredentials?: boolean; withCredentials?: boolean;
}): Promise<TResponse> { }): Promise<TResponse> {
const headers: Record<string, string> = {}; const headers: Record<string, string> = {};
if (useToken) headers["Authorization"] = `Bearer ${getAuthToken()}`; if (useToken) headers["Authorization"] = getAuthToken() ? "" : `Bearer ${getAuthToken()}`;
if (contentType) headers["Content-Type"] = "application/json"; if (contentType) headers["Content-Type"] = "application/json";
try { try {