Files
plantillas-proyectos/backend/api/v1/modules/public/reference_data/router.py
acazares b68c4316ff Refactor backend and frontend code for improved structure and functionality
- 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.
2025-11-11 17:20:47 -06:00

119 lines
3.7 KiB
Python

"""
Router principal de API v1
Agrega todos los módulos de la aplicación
"""
from fastapi import APIRouter
from .code_pedimento_regimens.routes import router as code_pedimento_regimens_router
from .containers.routes import router as containers_router
from .countries.routes import router as countries_router
from .currency_types.routes import router as currency_types_router
from .customs_sections.routes import router as customs_sections_router
from .customs_warehouses.routes import router as customs_warehouses_router
from .incoterms.routes import router as incoterms_router
from .invoice_types.routes import router as invoice_types_router
from .material_types.routes import router as material_types_router
from .payment_methods.routes import router as payment_methods_router
from .pedimento_codes.routes import router as pedimento_codes_router
from .pedimento_regimens.routes import router as pedimento_regimens_router
from .sectors.routes import router as sectors_router
from .states.routes import router as states_router
from .trailer_types.routes import router as trailer_types_router
from .transport_modes.routes import router as transport_modes_router
from .transport_types.routes import router as transport_types_router
from .valuation_methods.routes import router as valuation_methods_router
# Router principal
router = APIRouter()
# Registrar módulos
router.include_router(
pedimento_codes_router,
prefix="/refrence_data",
tags=["public / refrence_data / pedimento_codes"],
)
router.include_router(
payment_methods_router,
prefix="/refrence_data",
tags=["public / refrence_data / payment_methods"],
)
router.include_router(
containers_router,
prefix="/refrence_data",
tags=["public / refrence_data / containers"],
)
router.include_router(
countries_router,
prefix="/refrence_data",
tags=["public / refrence_data / countries"],
)
router.include_router(
material_types_router,
prefix="/refrence_data",
tags=["public / refrence_data / material_types"],
)
router.include_router(
currency_types_router,
prefix="/refrence_data",
tags=["public / refrence_data / currency_types"],
)
router.include_router(
states_router, prefix="/refrence_data", tags=["public / refrence_data / states"]
)
router.include_router(
trailer_types_router,
prefix="/refrence_data",
tags=["public / refrence_data / trailer_types"],
)
router.include_router(
transport_types_router,
prefix="/refrence_data",
tags=["public / refrence_data / transport_types"],
)
router.include_router(
customs_warehouses_router,
prefix="/refrence_data",
tags=["public / refrence_data / customs_warehouses"],
)
router.include_router(
valuation_methods_router,
prefix="/refrence_data",
tags=["public / refrence_data / valuation_methods"],
)
router.include_router(
sectors_router,
prefix="/refrence_data",
tags=["public / public / refrence_data / sectors"],
)
router.include_router(
transport_modes_router,
prefix="/refrence_data",
tags=["public / refrence_data / transport_modes"],
)
router.include_router(
customs_sections_router,
prefix="/refrence_data",
tags=["public / refrence_data / customs_sections"],
)
router.include_router(
invoice_types_router,
prefix="/refrence_data",
tags=["public / refrence_data / invoice_types"],
)
router.include_router(
code_pedimento_regimens_router,
prefix="/refrence_data",
tags=["public / refrence_data / code_pedimento_regimens"],
)
router.include_router(
pedimento_regimens_router,
prefix="/refrence_data",
tags=["public / refrence_data / pedimento_regimens"],
)
router.include_router(
incoterms_router,
prefix="/refrence_data",
tags=["public / refrence_data / incoterms"],
)