- 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.
27 lines
689 B
Rust
27 lines
689 B
Rust
use axum::{
|
|
Router,
|
|
routing::{get, post},
|
|
};
|
|
|
|
pub mod gacha_rolls_controller;
|
|
pub mod gacha_rolls_dto;
|
|
pub mod gacha_rolls_repository;
|
|
pub mod gacha_rolls_schema;
|
|
pub mod gacha_rolls_service;
|
|
|
|
// Export only public API functions and types
|
|
pub use gacha_rolls_controller::{
|
|
post_create_gacha_roll,
|
|
post_execute_gacha_roll,
|
|
get_detail_gacha_roll,
|
|
};
|
|
pub use gacha_rolls_dto::GachaRollItemDto;
|
|
|
|
/// Creates router for gacha rolls endpoints
|
|
pub fn gacha_roll_router() -> Router {
|
|
Router::new()
|
|
.route("/create", post(post_create_gacha_roll))
|
|
.route("/execute", post(post_execute_gacha_roll))
|
|
.route("/detail/{id}", get(get_detail_gacha_roll))
|
|
}
|