v1.0.92 fix usetoken in makerequest
This commit is contained in:
parent
b4258a0d46
commit
ebaaf06166
@ -24,7 +24,7 @@ export async function makeRequest<TRequest = unknown, TResponse = unknown>({
|
||||
withCredentials?: boolean;
|
||||
}): Promise<TResponse> {
|
||||
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";
|
||||
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user