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', 'nodes/receivedOpenAPISchema',
async (_, { rejectWithValue }) => { async (_, { rejectWithValue }) => {
try { 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 openAPISchema = await response.json();
const schemaJSON = JSON.parse( const schemaJSON = JSON.parse(