Skip to content

fix: resolve issues #83, #84, #85, #88#128

Open
richardiyamura wants to merge 1 commit into
scout-off:mainfrom
richardiyamura:fix/issues-83-84-85-88
Open

fix: resolve issues #83, #84, #85, #88#128
richardiyamura wants to merge 1 commit into
scout-off:mainfrom
richardiyamura:fix/issues-83-84-85-88

Conversation

@richardiyamura

Copy link
Copy Markdown

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

…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>
@drips-wave

drips-wave Bot commented May 27, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant