- 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.
36 lines
635 B
Python
36 lines
635 B
Python
"""
|
|
Core module - Configuración y utilidades centrales de la aplicación
|
|
"""
|
|
|
|
from .config import settings
|
|
from .database import (
|
|
Base,
|
|
get_async_core_db,
|
|
get_core_db,
|
|
get_tenant_db,
|
|
init_async_db,
|
|
init_db,
|
|
)
|
|
from .security import (
|
|
get_current_active_user,
|
|
get_current_user,
|
|
get_tenant_from_token,
|
|
has_role,
|
|
verify_token,
|
|
)
|
|
|
|
__all__ = [
|
|
"settings",
|
|
"Base",
|
|
"get_core_db",
|
|
"get_async_core_db",
|
|
"get_tenant_db",
|
|
"init_db",
|
|
"init_async_db",
|
|
"verify_token",
|
|
"get_current_user",
|
|
"get_current_active_user",
|
|
"has_role",
|
|
"get_tenant_from_token",
|
|
]
|