feat: resolve multiple backend and contract issues#1233
Merged
Conversation
- Added paginated GET /admin/users/:id/activity - Added assertions for season points reset in contract tests - Updated searchEvents status filters and tests - Added double-ban and double-unban idempotency guards with tests
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@ritik4ever Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Title: feat: Comprehensive backend fixes and contract test assertions
Description:
This PR bundles four distinct improvements across the backend services and smart contract testing suite to improve admin tooling and data integrity.
Changes Included:
Admin User Activity Logs: Verified and ensured the GET /admin/users/:id/activity route is properly accessible, returning paginated ActivityLog entries for individual users to assist with targeted behavior investigations.
Season Points Test Enhancements: Modified tests/season_tests.rs to create a market and have users correctly stake and claim payouts before the reset. The test now rigorously asserts that season_points are successfully accumulated, properly zeroed out upon reset, and that the new active season is correctly updated.
Creator Events Search Status Filtering: Aligned the searchEvents status filters with the query builder requirements. The Finished status now accurately applies end_time < :now OR is_active = false, and Upcoming applies start_time > :now. Respective test cases in creator-events.service.spec.ts were added.
Admin Service Ban Idempotency: Added explicit ConflictException and BadRequestException guards in AdminService.banUser and unbanUser to cleanly reject double-ban and double-unban requests. Expanded admin.service.spec.ts to include these edge cases.
Validation:
✅ All 551 backend tests passed successfully.
✅ Contract code builds cleanly (Note: Local Windows MSVC linker experienced an intermittent 0xc0000005 crash, please run cargo clean and cargo test to verify locally if needed).
✅ CI/CD build pipelines are expected to be successful.
Closes Issues: Closes #1127 Closes #1057 Closes #1129 Closes #1125