From 270de7f87c12d2c14c46d14bb6b99edbac39baf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= <40151420+ldericher@users.noreply.github.com> Date: Mon, 28 Mar 2022 20:59:27 +0000 Subject: [PATCH] Settings.config_file_name --- api/kiwi_vpn_api/config.py | 3 ++- api/kiwi_vpn_api/db/connection.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/api/kiwi_vpn_api/config.py b/api/kiwi_vpn_api/config.py index f577172..2ba228a 100644 --- a/api/kiwi_vpn_api/config.py +++ b/api/kiwi_vpn_api/config.py @@ -29,6 +29,7 @@ class Settings(BaseSettings): production_mode: bool = False data_dir: Path = Path("./tmp") + config_file_name: Path = Path("config.json") api_v1_prefix: str = "api/v1" openapi_url: str = "/openapi.json" docs_url: str | None = "/docs" @@ -42,7 +43,7 @@ class Settings(BaseSettings): @property def config_file(self) -> Path: - return self.data_dir.joinpath("config.json") + return self.data_dir.joinpath(self.config_file_name) class DBType(Enum): diff --git a/api/kiwi_vpn_api/db/connection.py b/api/kiwi_vpn_api/db/connection.py index ed5d4c2..5826daf 100644 --- a/api/kiwi_vpn_api/db/connection.py +++ b/api/kiwi_vpn_api/db/connection.py @@ -1,5 +1,5 @@ """ -Database connection management +Database connection management. """ from sqlmodel import Session, SQLModel, create_engine