fix: dynamic access path setup failure

This commit is contained in:
fit2cloud-chenyw
2026-01-24 14:40:05 +08:00
committed by fit2cloud-chenyw
parent 959529441a
commit e626d13971
+5 -1
View File
@@ -31,7 +31,6 @@ class Settings(BaseSettings):
PROJECT_NAME: str = "SQLBot"
#CONTEXT_PATH: str = "/sqlbot"
CONTEXT_PATH: str = ""
API_V1_STR: str = CONTEXT_PATH + "/api/v1"
SECRET_KEY: str = secrets.token_urlsafe(32)
# 60 minutes * 24 hours * 8 days = 8 days
ACCESS_TOKEN_EXPIRE_MINUTES: int = 60 * 24 * 8
@@ -48,6 +47,11 @@ class Settings(BaseSettings):
self.FRONTEND_HOST
]
@computed_field # type: ignore[prop-decorator]
@property
def API_V1_STR(self) -> str:
return self.CONTEXT_PATH + "/api/v1"
POSTGRES_SERVER: str = 'localhost'
POSTGRES_PORT: int = 5432
POSTGRES_USER: str = 'root'