fix: resolve issues #83, #84, #85, #88#128
Open
richardiyamura wants to merge 1 commit into
Open
Conversation
…ff#88 - Add response serialization helpers (ok, paginated, fail, normalizeTimestamps) in utils/response.ts - Normalize subscription/contact timestamps to ISO 8601 UTC (scout-off#83) - Use serialization helpers consistently across all route handlers (scout-off#84) - Add sortBy/sortOrder query params to player listing endpoint (scout-off#85) - Add playerId filter and pagination to admin events endpoint (scout-off#88) - Handle ZodError in errorHandler to return HTTP 400 on invalid params Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@richardiyamura 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.
Summary
Issue #83 — Subscription timestamp normalization:
scoutController.ts now passes subscription and contact payloads through
normalizeTimestamps(), converting Unix epoch fields (expiry, unlocked_at, etc.) to ISO
8601 UTC strings.
closes #83
Issue #84 — Response serialization helper:
New src/utils/response.ts with ok(), paginated(), fail(), toIso(), and
normalizeTimestamps(). All controllers and the error handler now use these instead of
inline { success: true, data: ... } literals.
closes #84
Issue #85 — Player search sorting:
filterPlayers in playerController.ts now accepts sortBy ('tier' | 'region') and sortOrder
('asc' | 'desc') query params. Invalid values are rejected with HTTP 400 via Zod
validation (which the updated errorHandler.ts now properly catches).
closes #85
Issue #88 — Admin event filtering by playerId:
getAllEvents in adminController.ts now accepts an optional playerId query param to filter
events, plus page/pageSize pagination — response includes full pagination metadata via
paginated().
closes #88