Do not sort dashboard domain first in the REST api

This commit is contained in:
Johannes Zellner
2025-10-17 18:55:22 +02:00
parent 6941a12314
commit a781a46f13
2 changed files with 8 additions and 9 deletions
+2 -3
View File
@@ -201,9 +201,8 @@ async function list() {
results.forEach(postProcess);
const { domain:dashboardDomain } = await dashboard.getLocation();
return results.sort((d1, d2) => { // domains are alphabetically sorted with the dashboard domain at index 0
return d1.domain === dashboardDomain ? -1 : (d2.domain === dashboardDomain ? 1: d1.domain.localeCompare(d2.domain));
return results.sort((d1, d2) => { // domains are alphabetically sorted
return d1.domain.localeCompare(d2.domain);
});
}