Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/api/endpoints/apiService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,7 @@ export const createNewOntology = async ({
};

const headers = {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
};

try {
Expand All @@ -199,7 +198,7 @@ export const createNewOntology = async ({
if (redirectLocation) {
const olympianRedirectLocation = redirectLocation.replace('http://uri.interlex.org','').replace(/\.html$/, '.jsonld');

const getResponse = await fetch(olympianRedirectLocation, { headers: { Authorization: `Bearer ${token}` } });
const getResponse = await fetch(olympianRedirectLocation);
const jsonResponse = await getResponse.json();

const newOntologyID = jsonResponse?.["@graph"]?.find((object) => object["@type"] === "owl:Ontology")?.["@id"] || null;
Expand Down