Refactor and enhance SurrealDB integration and resource management
- Updated `lib.rs` to selectively expose specific entities and services for better clarity. - Improved SurrealDB client initialization with detailed logging in `surrealdb/mod.rs`. - Enhanced resource definitions in `resource.rs` with additional utility methods for better resource management. - Refactored user data retrieval logic in `auth_middleware/mod.rs` for improved readability and efficiency. - Cleaned up middleware exports in `lib.rs` for clearer API surface. - Added detailed comments and documentation throughout the SurrealDB module for better maintainability. - Updated tests to ensure compatibility with new changes and improved structure. - Introduced new permissions module structure in `imphnen-utils` for future enhancements.
This commit is contained in:
@@ -1,6 +1,49 @@
|
||||
pub mod v1;
|
||||
|
||||
pub use imphnen_entities::*;
|
||||
pub use imphnen_libs::*;
|
||||
pub use imphnen_utils::*;
|
||||
pub use v1::*;
|
||||
// Re-export core entity types used across the gacha system
|
||||
pub use imphnen_entities::{
|
||||
CountResult,
|
||||
Error,
|
||||
ExperienceDto,
|
||||
EducationDto,
|
||||
MessageResponseDto,
|
||||
MetaRequestDto,
|
||||
MetaResponseDto,
|
||||
PermissionsEnum,
|
||||
PermissionsItemDto,
|
||||
PermissionsQueryDto,
|
||||
ResponseListSuccessDto,
|
||||
ResponseSuccessDto,
|
||||
UsersDetailQueryDto,
|
||||
};
|
||||
|
||||
// Explicitly import only what we need from libs and utils to avoid pollution
|
||||
pub use imphnen_libs::{
|
||||
AppState,
|
||||
MinioService,
|
||||
};
|
||||
|
||||
pub use imphnen_utils::{
|
||||
bind_filter,
|
||||
csrf_token,
|
||||
extract_email,
|
||||
generate_date,
|
||||
generate_otp,
|
||||
get_id,
|
||||
logger,
|
||||
make_thing,
|
||||
mock_test,
|
||||
query_builder,
|
||||
query_list,
|
||||
response_format,
|
||||
serde_helpers,
|
||||
validator,
|
||||
};
|
||||
|
||||
// Re-export public v1 API
|
||||
pub use v1::{
|
||||
gacha_claim_router,
|
||||
gacha_item_router,
|
||||
gacha_roll_router,
|
||||
gacha_router,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user