From e55f9d967a158fffed70c05ec03694bc73559a05 Mon Sep 17 00:00:00 2001 From: Daniel Nilsson Date: Sat, 20 Jul 2024 21:25:50 +0200 Subject: luci-app-attendedsysupgrade: use versioned endpoints The unversioned endpoint /api/overview has been removed from ASU which breaks the request when searching for an available sysupgrade if the device is on a stable release. In the case where the unversioned endpoint is added back to prevent this regression in 23.05.3 and earlier (so upgrade is once again possible) we should anyway rely on the versioned endpoints as those replace the unversioned ones. Signed-off-by: Daniel Nilsson --- .../luci-static/resources/view/attendedsysupgrade/overview.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade') diff --git a/applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js b/applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js index 0e6ae9d20c..011215ca3c 100644 --- a/applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js +++ b/applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js @@ -399,10 +399,9 @@ return view.extend({ let { url, revision, advanced_mode, branch } = data; let { version, target, profile, packages } = firmware; let candidates = []; - let request_url = `${url}/api/overview`; - if (version.endsWith('SNAPSHOT')) { - request_url = `${url}/api/v1/revision/${version}/${target}`; - } + + const endpoint = version.endsWith('SNAPSHOT') ? `revision/${version}/${target}` : 'overview'; + const request_url = `${url}/api/v1/${endpoint}`; ui.showModal(_('Searching...'), [ E( -- cgit v1.2.3