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,6 @@
|
||||
use axum::{
|
||||
Router,
|
||||
routing::{get, post},
|
||||
Router,
|
||||
routing::{get, post},
|
||||
};
|
||||
|
||||
pub mod gacha_claims_controller;
|
||||
@@ -9,14 +9,14 @@ pub mod gacha_claims_repository;
|
||||
pub mod gacha_claims_schema;
|
||||
pub mod gacha_claims_service;
|
||||
|
||||
pub use gacha_claims_controller::*;
|
||||
pub use gacha_claims_dto::*;
|
||||
pub use gacha_claims_repository::*;
|
||||
pub use gacha_claims_schema::*;
|
||||
pub use gacha_claims_service::*;
|
||||
// Export only public API functions
|
||||
pub use gacha_claims_controller::{post_create_gacha_claim, get_detail_gacha_claim};
|
||||
pub use gacha_claims_dto::{GachaClaimItemDto, GachaClaimRequestDto};
|
||||
pub use gacha_claims_service::GachaClaimService;
|
||||
|
||||
/// Creates router for gacha claims endpoints
|
||||
pub fn gacha_claim_router() -> Router {
|
||||
Router::new()
|
||||
.route("/create", post(post_create_gacha_claim))
|
||||
.route("/detail/{id}", get(get_detail_gacha_claim))
|
||||
Router::new()
|
||||
.route("/create", post(post_create_gacha_claim))
|
||||
.route("/detail/{id}", get(get_detail_gacha_claim))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user