cxb: cleanup of config

This commit is contained in:
Midorica 2023-11-13 10:12:52 -05:00
parent 005adfae38
commit 1a4dc88c8a
2 changed files with 1 additions and 43 deletions

View File

@ -1,9 +1,3 @@
server: server:
enable: True enable: True
loglevel: "info" loglevel: "info"
hostname: "localhost"
ssl_enable: False
port: 8082
port_secure: 443
ssl_cert: "cert/title.crt"
ssl_key: "cert/title.key"

View File

@ -19,42 +19,6 @@ class CxbServerConfig:
) )
) )
@property
def hostname(self) -> str:
return CoreConfig.get_config_field(
self.__config, "cxb", "server", "hostname", default="localhost"
)
@property
def ssl_enable(self) -> bool:
return CoreConfig.get_config_field(
self.__config, "cxb", "server", "ssl_enable", default=False
)
@property
def port(self) -> int:
return CoreConfig.get_config_field(
self.__config, "cxb", "server", "port", default=8082
)
@property
def port_secure(self) -> int:
return CoreConfig.get_config_field(
self.__config, "cxb", "server", "port_secure", default=443
)
@property
def ssl_cert(self) -> str:
return CoreConfig.get_config_field(
self.__config, "cxb", "server", "ssl_cert", default="cert/title.crt"
)
@property
def ssl_key(self) -> str:
return CoreConfig.get_config_field(
self.__config, "cxb", "server", "ssl_key", default="cert/title.key"
)
class CxbConfig(dict): class CxbConfig(dict):
def __init__(self) -> None: def __init__(self) -> None: