- Rearranged imports in multiple files for consistency and clarity. - Updated logging middleware to exclude specific paths from logging. - Enhanced security module by cleaning up token handling and improving tenant validation. - Added tenant and company scoped mixins for better database model management. - Implemented generic CRUD routes for tenant-scoped resources. - Improved error handling and response management in API routes. - Cleaned up login and logout processes to ensure proper session management. - Introduced mechanisms to clear local storage and cookies on tenant change. - Enhanced company store to detect tenant changes and clear data accordingly. - Added new DTO mixins for currency and value affect flags.
27 lines
871 B
Python
27 lines
871 B
Python
"""
|
|
Routes for PedimentoValidation CRUD operations
|
|
"""
|
|
|
|
from api.v1.common.tenant_crud_routes import TenantCRUDRoutes
|
|
|
|
from ..dtos.pedimento_validation import (
|
|
PedimentoValidationCreate,
|
|
PedimentoValidationResponse,
|
|
PedimentoValidationUpdate,
|
|
)
|
|
from ..services.pedimento_validation import PedimentoValidationService
|
|
|
|
# Create router with generic CRUD routes for child resource
|
|
router = TenantCRUDRoutes(
|
|
service=PedimentoValidationService,
|
|
create_schema=PedimentoValidationCreate,
|
|
update_schema=PedimentoValidationUpdate,
|
|
response_schema=PedimentoValidationResponse,
|
|
prefix="/{pedimento_id}/validation",
|
|
tags=[],
|
|
resource_name="Pedimento validation",
|
|
parent_id_name="pedimento_id",
|
|
enable_list=False, # Child resource - no list endpoint
|
|
validate_parent_match=True, # Validate pedimento_id matches in create
|
|
).router
|