Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikB2014 committed Aug 23, 2024
1 parent 164d8d4 commit 4ab20f4
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions src/build/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,3 @@ export const resolveRemoteApiSpec = async (): Promise<DeRefedOpenAPI> => {
);
return response.json() as Promise<DeRefedOpenAPI>;
};

export const resolveSpecWithXHR = new Promise<DeRefedOpenAPI>((resolve, reject) => {
const xhr = new XMLHttpRequest();
xhr.onreadystatechange = () => {
if (xhr.readyState === XMLHttpRequest.DONE) {
return resolve(JSON.parse(xhr.responseText) as DeRefedOpenAPI);
}
if (xhr.readyState === XMLHttpRequest.UNSENT) {
return reject('Failed to fetch schema');
}
return undefined;
};
xhr.open(
'GET',
`https://raw.githubusercontent.com/getsentry/sentry-api-schema/${SENTRY_API_SCHEMA_SHA}/openapi-derefed.json`,
true
);
xhr.send(null);
});

0 comments on commit 4ab20f4

Please sign in to comment.