Commit ·
1d14811
1
Parent(s): e40452d
added fixes
Browse files- behavior_backend/app/api/routes/processing.py +1 -0
- behavior_backend/main.py +3 -1
- test_api.py +4 -1
behavior_backend/app/api/routes/processing.py
CHANGED
|
@@ -128,6 +128,7 @@ async def get_processing_results(
|
|
| 128 |
return results
|
| 129 |
|
| 130 |
@router.post("/direct", response_model=ProcessingStatus)
|
|
|
|
| 131 |
async def process_video_direct(
|
| 132 |
request: ProcessingRequest,
|
| 133 |
background_tasks: BackgroundTasks,
|
|
|
|
| 128 |
return results
|
| 129 |
|
| 130 |
@router.post("/direct", response_model=ProcessingStatus)
|
| 131 |
+
@router.post("/direct/", response_model=ProcessingStatus)
|
| 132 |
async def process_video_direct(
|
| 133 |
request: ProcessingRequest,
|
| 134 |
background_tasks: BackgroundTasks,
|
behavior_backend/main.py
CHANGED
|
@@ -66,7 +66,9 @@ app = FastAPI(
|
|
| 66 |
description="API for behavior analytics processing",
|
| 67 |
version="1.0.0",
|
| 68 |
docs_url="/docs", # Swagger UI
|
| 69 |
-
redoc_url="/redoc" # ReDoc UI
|
|
|
|
|
|
|
| 70 |
)
|
| 71 |
|
| 72 |
# Configure CORS
|
|
|
|
| 66 |
description="API for behavior analytics processing",
|
| 67 |
version="1.0.0",
|
| 68 |
docs_url="/docs", # Swagger UI
|
| 69 |
+
redoc_url="/redoc", # ReDoc UI
|
| 70 |
+
# Disable automatic redirect for trailing slashes
|
| 71 |
+
redirect_slashes=False
|
| 72 |
)
|
| 73 |
|
| 74 |
# Configure CORS
|
test_api.py
CHANGED
|
@@ -18,7 +18,10 @@ def test_root():
|
|
| 18 |
|
| 19 |
def test_basic_health():
|
| 20 |
"""Test the basic health endpoint"""
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
| 22 |
print("\nBasic Health Endpoint (/health) Response:", response.status_code)
|
| 23 |
print(response.json() if response.ok else response.text)
|
| 24 |
|
|
|
|
| 18 |
|
| 19 |
def test_basic_health():
|
| 20 |
"""Test the basic health endpoint"""
|
| 21 |
+
params = {
|
| 22 |
+
"__sign": HF_SIGN
|
| 23 |
+
}
|
| 24 |
+
response = requests.get(f"{BASE_URL}/health", params=params)
|
| 25 |
print("\nBasic Health Endpoint (/health) Response:", response.status_code)
|
| 26 |
print(response.json() if response.ok else response.text)
|
| 27 |
|