add get working directory endpoint

pull/13/head
Inex Code 2022-08-13 01:34:48 +04:00
parent 00badfbbf8
commit 1e901d1fcb
1 changed files with 5 additions and 0 deletions

View File

@ -1,5 +1,6 @@
"""Common system information and settings"""
# pylint: disable=too-few-public-methods
import os
import typing
import strawberry
from selfprivacy_api.graphql.common_types.dns import DnsRecord
@ -135,3 +136,7 @@ class System:
info: SystemInfo = SystemInfo()
provider: SystemProviderInfo = strawberry.field(resolver=get_system_provider_info)
busy: bool = False
@strawberry.field
def working_directory(self) -> str:
"""Get working directory"""
return os.getcwd()