Skip to content

Add GET /v1/users/{id}/contests endpoint#790

Closed
dylanjeffers wants to merge 1 commit intomainfrom
feat/user-contests-endpoint
Closed

Add GET /v1/users/{id}/contests endpoint#790
dylanjeffers wants to merge 1 commit intomainfrom
feat/user-contests-endpoint

Conversation

@dylanjeffers
Copy link
Copy Markdown
Contributor

Summary

  • Adds GET /v1/users/{id}/contests and /v1/users/handle/{handle}/contests, returning remix-contest events hosted by a given user — active first by soonest-ending end_date, then ended most-recently-first.
  • Mirrors the payload shape of /v1/events/remix-contests (data + related.{users,tracks,entry_counts}) so the discovery and per-profile call sites share React Query priming logic.
  • Lets the web/mobile profile "Contests" tab stop pulling the global contest list and discarding ~everything that isn't this artist's.

Test plan

  • TestUserContestsScopedToHost passes in CI (covers host-scoping, ordering, status filter, related payload, empty case)
  • Verify SDK regen against this branch picks up getContestsByUser (already done locally)
  • Sanity-check the new route on staging once deployed

🤖 Generated with Claude Code

New per-user remix-contest endpoint mirroring v1EventsRemixContests but
filtered by host user_id at the database layer, so the web/mobile
profile "Contests" tab no longer has to fetch the global contest list
and discard everything that isn't theirs.

Returns the same payload shape as the global endpoint (data + related
users/tracks/entry_counts) so the discovery and per-profile call sites
share React Query priming logic. Active contests come first by
soonest-ending end_date; ended contests follow most-recently-first.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dylanjeffers
Copy link
Copy Markdown
Contributor Author

Duplicate — #791 already merged

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant