Return profiles from the API sorted by name

pull/238/head
Gadgetmies 2025-08-05 20:24:06 +03:00
rodzic a2b3071e4e
commit 3f873ba2a2
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -268,7 +268,7 @@ def get_profiles():
with open(os.path.join(profile_path, filename), 'r') as f:
profiles.append(json.load(f))
profiles = normalize_temp_units(profiles)
return json.dumps(profiles)
return json.dumps(sorted(profiles, key=lambda x: x["name"]))
def save_profile(profile, force=False):