Skip to content

Commit

Permalink
Fix api docs existence check - if redirected we consider it wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
marwie committed Apr 2, 2024
1 parent ca3c842 commit 1c7f954
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/build_api_docs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async function main() {
const url = needleEngineApiBaseUrl + "/" + versionInfo.name + "/" + versionInfo.version + "/" + versionFile;
console.log("Checking if API documentation already exists for " + versionInfo.name + " " + versionInfo.version + " at " + url);
const response = await fetch(url, { method: "HEAD" });
if (response.status === 200) {
if (response.status === 200 && !response.redirected) {
console.log("API documentation already exists for " + versionInfo.name + " " + versionInfo.version);
continue;
}
Expand Down

0 comments on commit 1c7f954

Please sign in to comment.