fix: Sort services

This commit is contained in:
Inex Code 2024-12-24 15:53:14 +03:00
parent 146b4cd1e7
commit 1d7879acc1
No known key found for this signature in database

View file

@ -16,5 +16,5 @@ from selfprivacy_api.services import ServiceManager
class Services:
@strawberry.field
def all_services(self) -> typing.List[Service]:
services = ServiceManager.get_all_services()
return [service_to_graphql_service(service) for service in services]
services = [service_to_graphql_service(service) for service in ServiceManager.get_all_services()]
return sorted(services, key=lambda service: service.display_name)