Update app/api/routes.py
Browse files- app/api/routes.py +1 -17
app/api/routes.py
CHANGED
|
@@ -27,7 +27,7 @@ async def categorize_transaction(
|
|
| 27 |
response_time=time.monotonic() - started_at,
|
| 28 |
user_id=payload.user_id,
|
| 29 |
)
|
| 30 |
-
return CategorizeResponse(status="success", data=result)
|
| 31 |
except HTTPException as exc:
|
| 32 |
await api_logger.log_categorization(
|
| 33 |
name="Auto Expense Categorization",
|
|
@@ -58,19 +58,3 @@ def _normalize_error_detail(detail: Any) -> str:
|
|
| 58 |
if isinstance(detail, str):
|
| 59 |
return detail
|
| 60 |
return str(detail)
|
| 61 |
-
|
| 62 |
-
# from fastapi import APIRouter, Depends
|
| 63 |
-
|
| 64 |
-
# from app.dependencies import get_category_service
|
| 65 |
-
# from app.schemas.categories import CategorizeRequest, CategoryPrediction
|
| 66 |
-
# from app.services.autocategorizer import AutoCategoryService
|
| 67 |
-
|
| 68 |
-
# router = APIRouter()
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
# @router.post("/categorize", response_model=CategoryPrediction, summary="Categorize a transaction note")
|
| 72 |
-
# async def categorize_transaction(
|
| 73 |
-
# payload: CategorizeRequest,
|
| 74 |
-
# service: AutoCategoryService = Depends(get_category_service),
|
| 75 |
-
# ) -> CategoryPrediction:
|
| 76 |
-
# return await service.categorize(payload.notes)
|
|
|
|
| 27 |
response_time=time.monotonic() - started_at,
|
| 28 |
user_id=payload.user_id,
|
| 29 |
)
|
| 30 |
+
return CategorizeResponse(status="success", data=result, message="Logs stored")
|
| 31 |
except HTTPException as exc:
|
| 32 |
await api_logger.log_categorization(
|
| 33 |
name="Auto Expense Categorization",
|
|
|
|
| 58 |
if isinstance(detail, str):
|
| 59 |
return detail
|
| 60 |
return str(detail)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|