mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-12-04 20:36:35 +00:00
7935de0fe1
Co-authored-by: inexcode <inex.code@selfprivacy.org> Reviewed-on: https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api/pulls/13
19 lines
480 B
Python
19 lines
480 B
Python
"""Services status"""
|
|
# pylint: disable=too-few-public-methods
|
|
import typing
|
|
import strawberry
|
|
|
|
from selfprivacy_api.graphql.common_types.service import (
|
|
Service,
|
|
service_to_graphql_service,
|
|
)
|
|
from selfprivacy_api.services import get_all_services
|
|
|
|
|
|
@strawberry.type
|
|
class Services:
|
|
@strawberry.field
|
|
def all_services(self) -> typing.List[Service]:
|
|
services = get_all_services()
|
|
return [service_to_graphql_service(service) for service in services]
|