Skip to content

Commit e626d13

Browse files
fix: dynamic access path setup failure
1 parent 9595294 commit e626d13

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

backend/common/core/config.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ class Settings(BaseSettings):
3131
PROJECT_NAME: str = "SQLBot"
3232
#CONTEXT_PATH: str = "/sqlbot"
3333
CONTEXT_PATH: str = ""
34-
API_V1_STR: str = CONTEXT_PATH + "/api/v1"
3534
SECRET_KEY: str = secrets.token_urlsafe(32)
3635
# 60 minutes * 24 hours * 8 days = 8 days
3736
ACCESS_TOKEN_EXPIRE_MINUTES: int = 60 * 24 * 8
@@ -48,6 +47,11 @@ def all_cors_origins(self) -> list[str]:
4847
self.FRONTEND_HOST
4948
]
5049

50+
@computed_field # type: ignore[prop-decorator]
51+
@property
52+
def API_V1_STR(self) -> str:
53+
return self.CONTEXT_PATH + "/api/v1"
54+
5155
POSTGRES_SERVER: str = 'localhost'
5256
POSTGRES_PORT: int = 5432
5357
POSTGRES_USER: str = 'root'

0 commit comments

Comments
 (0)