- 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
726 B
Python
27 lines
726 B
Python
"""
|
|
Routes for PedimentoDates CRUD operations
|
|
"""
|
|
|
|
from api.v1.common.tenant_crud_routes import TenantCRUDRoutes
|
|
|
|
from ..dtos.pedimento_dates import (
|
|
PedimentoDatesCreate,
|
|
PedimentoDatesResponse,
|
|
PedimentoDatesUpdate,
|
|
)
|
|
from ..services.pedimento_dates import PedimentoDatesService
|
|
|
|
# Create router with generic CRUD routes for child resource
|
|
router = TenantCRUDRoutes(
|
|
service=PedimentoDatesService,
|
|
create_schema=PedimentoDatesCreate,
|
|
update_schema=PedimentoDatesUpdate,
|
|
response_schema=PedimentoDatesResponse,
|
|
prefix="/{pedimento_id}/dates",
|
|
tags=[],
|
|
resource_name="Pedimento dates",
|
|
parent_id_name="pedimento_id",
|
|
enable_list=False,
|
|
validate_parent_match=True,
|
|
).router
|