Skip to content

Commit

Permalink
Fix OPTIONS request in getState.ts fetching (#6699)
Browse files Browse the repository at this point in the history
  • Loading branch information
VIKTORVAV99 committed Apr 30, 2024
1 parent 59aa770 commit 3ce0e0b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions web/src/api/getState.ts
Expand Up @@ -10,12 +10,8 @@ import { cacheBuster, getBasePath, getHeaders, QUERY_KEYS } from './helpers';
const getState = async (timeAverage: string): Promise<GridState> => {
const path: URL = new URL(`v8/state/${timeAverage}`, getBasePath());
path.searchParams.append('cacheKey', cacheBuster());
const requestOptions: RequestInit = {
method: 'GET',
headers: await getHeaders(path),
};

const response = await fetch(path, requestOptions);
const response = await fetch(path);

if (response.ok) {
const result = (await response.json()) as GridState;
Expand Down

0 comments on commit 3ce0e0b

Please sign in to comment.