fix(ui): construct openapi url from window.location.origin

This commit is contained in:
psychedelicious 2023-09-15 12:24:53 +10:00 committed by Kent Keirsey
parent 5a42774fbe
commit 604fc006b1

View File

@ -26,7 +26,8 @@ export const receivedOpenAPISchema = createAsyncThunk(
'nodes/receivedOpenAPISchema',
async (_, { rejectWithValue }) => {
try {
const response = await fetch(`openapi.json`);
const url = [window.location.origin, 'openapi.json'].join('/');
const response = await fetch(url);
const openAPISchema = await response.json();
const schemaJSON = JSON.parse(