Spaces:
Sleeping
Sleeping
Update backend with high-quality catalog and fixes
Browse files- app/main.py +14 -2
- requirements.txt +2 -0
app/main.py
CHANGED
|
@@ -95,19 +95,31 @@ def create_app() -> FastAPI:
|
|
| 95 |
|
| 96 |
app.include_router(settings_router, prefix="/api")
|
| 97 |
|
|
|
|
|
|
|
| 98 |
@app.get("/", tags=["Health"])
|
| 99 |
async def root():
|
| 100 |
"""Root endpoint for Hugging Face health checks."""
|
| 101 |
-
return {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
|
| 103 |
@app.get("/health", tags=["Health"])
|
| 104 |
async def health_check():
|
| 105 |
return {
|
| 106 |
"isSuccess": True,
|
| 107 |
-
"value": {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
"statusCode": 200,
|
| 109 |
}
|
| 110 |
|
|
|
|
| 111 |
return app
|
| 112 |
|
| 113 |
app = create_app()
|
|
|
|
| 95 |
|
| 96 |
app.include_router(settings_router, prefix="/api")
|
| 97 |
|
| 98 |
+
VERSION = "1.0.1-DEBUG"
|
| 99 |
+
|
| 100 |
@app.get("/", tags=["Health"])
|
| 101 |
async def root():
|
| 102 |
"""Root endpoint for Hugging Face health checks."""
|
| 103 |
+
return {
|
| 104 |
+
"status": "ok",
|
| 105 |
+
"service": "VortexCommerce API",
|
| 106 |
+
"version": VERSION,
|
| 107 |
+
"deployed_at": "2026-03-16T11:45:00Z"
|
| 108 |
+
}
|
| 109 |
|
| 110 |
@app.get("/health", tags=["Health"])
|
| 111 |
async def health_check():
|
| 112 |
return {
|
| 113 |
"isSuccess": True,
|
| 114 |
+
"value": {
|
| 115 |
+
"status": "healthy",
|
| 116 |
+
"service": "VortexCommerce API",
|
| 117 |
+
"version": VERSION
|
| 118 |
+
},
|
| 119 |
"statusCode": 200,
|
| 120 |
}
|
| 121 |
|
| 122 |
+
print(f">>> [MAIN] Application initialized. Version: {VERSION}")
|
| 123 |
return app
|
| 124 |
|
| 125 |
app = create_app()
|
requirements.txt
CHANGED
|
@@ -17,3 +17,5 @@ reportlab==4.0.9
|
|
| 17 |
email-validator==2.1.0.post1
|
| 18 |
requests==2.31.0
|
| 19 |
urllib3<2
|
|
|
|
|
|
|
|
|
| 17 |
email-validator==2.1.0.post1
|
| 18 |
requests==2.31.0
|
| 19 |
urllib3<2
|
| 20 |
+
chardet==5.2.0
|
| 21 |
+
charset-normalizer==3.3.2
|