Files
plantillas-proyectos/backend/api/v1/modules/a76/pedmientos/router.py
acazares 52b8fcd434 feat: Implement multi-tenancy support in middleware and security layers
- Enhanced TenantMiddleware to validate tenant information from JWT tokens.
- Added LicenseValidationMiddleware to check tenant licenses before processing requests.
- Updated security utilities to extract tenant information from tokens and validate company access.
- Introduced CompanyStore to manage active company state and handle company switching in the frontend.
- Modified API routes to include company_id in requests for better resource management.
- Improved logging and error handling throughout the middleware and API layers.
- Updated frontend components to reflect changes in company management and selection.
- Added new API route for fetching user's companies with proper authentication handling.
2025-11-11 14:15:31 -06:00

120 lines
4.0 KiB
Python

from fastapi import APIRouter
from .routes.pedimento_config_additional import (
router as pedimento_config_additional_router,
)
from .routes.pedimento_config_calculations import (
router as pedimento_config_calculations_router,
)
from .routes.pedimento_config_parameters import (
router as pedimento_config_parameters_router,
)
from .routes.pedimento_config_surcharges import (
router as pedimento_config_surcharges_router,
)
from .routes.pedimento_config_update_rectification import (
router as pedimento_config_update_rectification_router,
)
from .routes.pedimento_config_updates import router as pedimento_config_updates_router
from .routes.pedimento_customs_offices import router as pedimento_customs_offices_router
from .routes.pedimento_dates import router as pedimento_dates_router
from .routes.pedimento_decrementables import router as pedimento_decrementables_router
from .routes.pedimento_incrementables import router as pedimento_incrementables_router
from .routes.pedimento_indexes import router as pedimento_indexes_router
from .routes.pedimento_payments import router as pedimento_payments_router
from .routes.pedimento_rectification_destination import (
router as pedimento_rectification_destination_router,
)
from .routes.pedimento_rectification_origin import (
router as pedimento_rectification_origin_router,
)
from .routes.pedimento_transport_means import router as pedimento_transport_means_router
from .routes.pedimento_validation import router as pedimento_validation_router
from .routes.pedimentos import router as pedimentos_router
router = APIRouter()
router.include_router(
pedimento_config_additional_router,
prefix="/pedimentos",
tags=["a76 / pedimentos / pedimento_config_additional"],
)
router.include_router(
pedimento_config_calculations_router,
prefix="/pedimentos",
tags=["a76 / pedimentos / pedimento_config_calculations"],
)
router.include_router(
pedimento_config_parameters_router,
prefix="/pedimentos",
tags=["a76 / pedimentos / pedimento_config_parameters"],
)
router.include_router(
pedimento_config_surcharges_router,
prefix="/pedimentos",
tags=["a76 / pedimentos / pedimento_config_surcharges"],
)
router.include_router(
pedimento_config_update_rectification_router,
prefix="/pedimentos",
tags=["a76 / pedimentos / pedimento_config_update_rectification"],
)
router.include_router(
pedimento_config_updates_router,
prefix="/pedimentos",
tags=["a76 / pedimentos / pedimento_config_updates"],
)
router.include_router(
pedimento_customs_offices_router,
prefix="/pedimentos",
tags=["a76 / pedimentos / pedimento_customs_offices"],
)
router.include_router(
pedimento_dates_router,
prefix="/pedimentos",
tags=["a76 / pedimentos / pedimento_dates"],
)
router.include_router(
pedimento_decrementables_router,
prefix="/pedimentos",
tags=["a76 / pedimentos / pedimento_decrementables"],
)
router.include_router(
pedimento_incrementables_router,
prefix="/pedimentos",
tags=["a76 / pedimentos / pedimento_incrementables"],
)
router.include_router(
pedimento_indexes_router,
prefix="/pedimentos",
tags=["a76 / pedimentos / pedimento_indexes"],
)
router.include_router(
pedimento_payments_router,
prefix="/pedimentos",
tags=["a76 / pedimentos / pedimento_payments"],
)
router.include_router(
pedimento_rectification_destination_router,
prefix="/pedimentos",
tags=["a76 / pedimentos / pedimento_rectification_destination"],
)
router.include_router(
pedimento_rectification_origin_router,
prefix="/pedimentos",
tags=["a76 / pedimentos / pedimento_rectification_origin"],
)
router.include_router(
pedimento_transport_means_router,
prefix="/pedimentos",
tags=["a76 / pedimentos / pedimento_transport_means"],
)
router.include_router(
pedimento_validation_router,
prefix="/pedimentos",
tags=["a76 / pedimentos / pedimento_validation"],
)
router.include_router(
pedimentos_router, prefix="/pedimentos", tags=["a76 / pedimentos"]
)