Implement rate limiting middleware for authentication endpoints, adding security headers middleware, and comprehensive error handling. Enhance validation tests for various DTOs and ensure proper functionality of gacha credits and rolls. Add unit tests for rate limiting and security headers middleware to validate behavior under different conditions.

This commit is contained in:
MythEclipse
2025-10-11 23:23:51 +07:00
parent 789b20c278
commit b6b5f48055
32 changed files with 1734 additions and 163 deletions
+8 -6
View File
@@ -6,15 +6,17 @@ pub mod gacha_items;
pub mod 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_credits::gacha_credit_router;
pub use gacha_items::gacha_item_router;
pub use gacha_rolls::gacha_roll_router;
pub use gacha_claims::gacha_claim_router;
/// Creates the main gacha router with all version 1 endpoints
pub fn gacha_router() -> Router {
Router::new()
.nest("/claims", gacha_claim_router())
.nest("/items", gacha_item_router())
.nest("/rolls", gacha_roll_router())
let mut router = Router::new();
router = router.nest("/credits", gacha_credit_router());
router = router.nest("/items", gacha_item_router());
router = router.nest("/rolls", gacha_roll_router());
router = router.nest("/claims", gacha_claim_router());
router
}