This commit is contained in:
parent
409e0907cc
commit
c0abd13d20
@ -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 {
|
||||
|
@ -9,7 +9,7 @@ export function useSSESubscription<T>({ enabled = true, url, onNewData, onDiscon
|
||||
onNewData: (data: T[]) => void;
|
||||
onDisconnect?: () => void;
|
||||
marker?: string;
|
||||
checkData?: string;
|
||||
checkData?: boolean;
|
||||
}) {
|
||||
const onNewDataRef = useRef(onNewData);
|
||||
const onDisconnectRef = useRef(onDisconnect);
|
||||
|
Loading…
Reference in New Issue
Block a user