Simplified latest parameter setting

This commit is contained in:
Gerrit Grunwald 2021-03-14 15:44:50 +01:00
commit 131290ed3e
2 changed files with 6 additions and 30 deletions

View file

@ -236,20 +236,6 @@ async function getDownloadInfo(
}
}
let latest = '';
if (version.endsWith('x')) {
if (version.endsWith('.x')) {
version = version.slice(0, -2);
latest = 'per_version';
} else {
version = version.slice(0, -1);
latest = 'overall';
}
}
if (version.includes('ea')) {
latest = 'overall';
}
let url = DISCO_URL + PACKAGES_PATH;
url += '?distro=' + distribution;
if (version.length != 0) {
@ -268,7 +254,9 @@ async function getDownloadInfo(
url += '&architecture=' + architecture;
url += '&operating_system=' + operatingSystem;
url += '&archive_type=' + archiveType;
url += '&latest=' + latest;
if (version.endsWith('x') || version.includes('ea')) {
url += '&latest=overall';
}
const http = new httpm.HttpClient('bundles', undefined, {
allowRetries: true,