fix: add Pydantic models for customer/inventory endpoints and align JS rules
- Add Pydantic response models for vendor customer endpoints - Add InventoryMessageResponse for delete endpoint - Align JS rule IDs between YAML and validation script (JS-001=logger, JS-002=apiClient) - Add exception for init-*.js files in console logging check 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
5
app/api/v1/vendor/inventory.py
vendored
5
app/api/v1/vendor/inventory.py
vendored
@@ -18,6 +18,7 @@ from models.schema.inventory import (
|
||||
InventoryAdjust,
|
||||
InventoryCreate,
|
||||
InventoryListResponse,
|
||||
InventoryMessageResponse,
|
||||
InventoryReserve,
|
||||
InventoryResponse,
|
||||
InventoryUpdate,
|
||||
@@ -123,7 +124,7 @@ def update_inventory(
|
||||
)
|
||||
|
||||
|
||||
@router.delete("/inventory/{inventory_id}")
|
||||
@router.delete("/inventory/{inventory_id}", response_model=InventoryMessageResponse)
|
||||
def delete_inventory(
|
||||
inventory_id: int,
|
||||
current_user: User = Depends(get_current_vendor_api),
|
||||
@@ -131,4 +132,4 @@ def delete_inventory(
|
||||
):
|
||||
"""Delete inventory entry."""
|
||||
inventory_service.delete_inventory(db, current_user.token_vendor_id, inventory_id)
|
||||
return {"message": "Inventory deleted successfully"}
|
||||
return InventoryMessageResponse(message="Inventory deleted successfully")
|
||||
|
||||
Reference in New Issue
Block a user