Spaces:
Running
Running
Commit
·
d3528b2
1
Parent(s):
e61d931
Update API URL in main function to use PORTFOLIO_URL for profile access
Browse files
app.py
CHANGED
@@ -354,7 +354,7 @@ def main():
|
|
354 |
st.success(f"Profile saved successfully with ID: {inserted_id}")
|
355 |
|
356 |
# Display the API URL using the configured API URL
|
357 |
-
api_url = f"{settings.
|
358 |
st.info(f"Access your profile via API: [Profile API]({api_url})")
|
359 |
|
360 |
# Show External API endpoint if available
|
|
|
354 |
st.success(f"Profile saved successfully with ID: {inserted_id}")
|
355 |
|
356 |
# Display the API URL using the configured API URL
|
357 |
+
api_url = f"{settings.PORTFOLIO_URL}/{inserted_id}"
|
358 |
st.info(f"Access your profile via API: [Profile API]({api_url})")
|
359 |
|
360 |
# Show External API endpoint if available
|
config.py
CHANGED
@@ -33,6 +33,8 @@ class Settings(BaseSettings):
|
|
33 |
# API URL - will use external URL if provided, otherwise build from host/port
|
34 |
API_URL: str = os.getenv("API_URL", EXTERNAL_API_URL or f"http://{API_HOST}:{API_PORT}")
|
35 |
|
|
|
|
|
36 |
# Allowed origins for CORS
|
37 |
ALLOWED_ORIGINS: List[str] = ["*"]
|
38 |
|
|
|
33 |
# API URL - will use external URL if provided, otherwise build from host/port
|
34 |
API_URL: str = os.getenv("API_URL", EXTERNAL_API_URL or f"http://{API_HOST}:{API_PORT}")
|
35 |
|
36 |
+
PORTFOLIO_URL:str ="https://iportfo.netlify.app"
|
37 |
+
|
38 |
# Allowed origins for CORS
|
39 |
ALLOWED_ORIGINS: List[str] = ["*"]
|
40 |
|