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:
@@ -5,14 +5,16 @@ pub mod gacha_credits;
|
||||
pub mod gacha_items;
|
||||
pub mod gacha_rolls;
|
||||
|
||||
pub use gacha_claims::*;
|
||||
pub use gacha_credits::*;
|
||||
pub use gacha_items::*;
|
||||
pub use gacha_rolls::*;
|
||||
// Export only public router functions to avoid namespace pollution
|
||||
pub use gacha_claims::gacha_claim_router;
|
||||
pub use gacha_credits::*; // gacha_credits doesn't have router functions
|
||||
pub use gacha_items::gacha_item_router;
|
||||
pub use gacha_rolls::gacha_roll_router;
|
||||
|
||||
/// Creates the main gacha router with all version 1 endpoints
|
||||
pub fn gacha_router() -> Router {
|
||||
Router::new()
|
||||
.nest("/gacha/claims", gacha_claim_router())
|
||||
.nest("/gacha/items", gacha_item_router())
|
||||
.nest("/gacha/rolls", gacha_roll_router())
|
||||
Router::new()
|
||||
.nest("/claims", gacha_claim_router())
|
||||
.nest("/items", gacha_item_router())
|
||||
.nest("/rolls", gacha_roll_router())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user