Skip to content

Commit

Permalink
get rid of all fetch params
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Tilsch committed Aug 6, 2023
1 parent 8cc74fd commit 493da06
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions components/utils/k10plus/findEntityWithinK10Plus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,7 @@ export const findEntityWithinK10Plus = async (searchString: string, typeName: st
let rawResponse
const recordSchemaString = recordSchema ? `&recordSchema=${encodeURIComponent(recordSchema)}` : ''
try {
rawResponse = await fetch(`${endpointURL}?version=1.1&query=pica.all%3D${encodeURIComponent(searchString)}&operation=searchRetrieve&maximumRecords=${limit}${recordSchemaString}`,
{
headers: {
'Accept': 'application/xml',
'Access-Control-Allow-Origin': '*',
},
})
rawResponse = await fetch(`${endpointURL}?version=1.1&query=pica.all%3D${encodeURIComponent(searchString)}&operation=searchRetrieve&maximumRecords=${limit}${recordSchemaString}`)
} catch (e) {
console.error('Error fetching from K10Plus', e)
return
Expand Down

0 comments on commit 493da06

Please sign in to comment.