mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
fix: dynamic access path setup failure
This commit is contained in:
committed by
fit2cloud-chenyw
parent
959529441a
commit
e626d13971
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user