use pydantic v2
This commit is contained in:
parent
d03c722517
commit
e8d8e1f5be
@ -31,7 +31,7 @@ def write_wg(config: Config):
|
||||
|
||||
def get_config() -> Optional[Config]:
|
||||
with open("/snacks/wireguard/wg.json", "r", encoding="utf-8") as f:
|
||||
config = Config.parse_raw(f.read())
|
||||
config = Config.model_validate_json(f.read())
|
||||
config.host = socket.gethostbyname(config.host)
|
||||
return config
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user