feat: include is_public in admin players list response #246

Merged
forgejo_admin merged 1 commit from 111-player-visibility-api into main 2026-03-29 19:15:59 +00:00
Contributor

Summary

The GET /admin/players endpoint now includes is_public in each player item, enabling the westside-app admin UI to display current visibility state and toggle it.

Changes

  • src/basketball_api/routes/admin.py — Added is_public: bool field to AdminPlayerItem model and included player.is_public in the response construction
  • tests/test_admin_spa.py — Added is_public to the expected response fields assertion

Test Plan

  • pytest tests/test_admin_spa.py — 8 passed
  • pytest tests/test_player_visibility.py tests/test_bulk_visibility.py — 33 passed
  • Full suite: 430 passed, 1 pre-existing failure (missing groupme_sdk)

Review Checklist

  • ruff format — no changes
  • ruff check — all checks passed
  • Tests pass
  • No unrelated changes
## Summary The GET /admin/players endpoint now includes `is_public` in each player item, enabling the westside-app admin UI to display current visibility state and toggle it. ## Changes - `src/basketball_api/routes/admin.py` — Added `is_public: bool` field to `AdminPlayerItem` model and included `player.is_public` in the response construction - `tests/test_admin_spa.py` — Added `is_public` to the expected response fields assertion ## Test Plan - `pytest tests/test_admin_spa.py` — 8 passed - `pytest tests/test_player_visibility.py tests/test_bulk_visibility.py` — 33 passed - Full suite: 430 passed, 1 pre-existing failure (missing groupme_sdk) ## Review Checklist - [x] ruff format — no changes - [x] ruff check — all checks passed - [x] Tests pass - [x] No unrelated changes ## Related Notes - Closes forgejo_admin/westside-landing#111 ## Related - Forgejo issue: forgejo_admin/westside-landing#111
feat: include is_public in admin players list response
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
3c167eae94
The AdminPlayerItem model and GET /admin/players response now include
the is_public boolean field, enabling the westside-app admin UI to
display and toggle player visibility state.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Contributor

Self-Review

Minimal change, low risk. Two files touched:

  1. AdminPlayerItem — added is_public: bool field to the Pydantic model
  2. Response builder — added is_public=player.is_public to the results.append() call
  3. Test — added "is_public" to the test_response_fields expected fields list

All 33 visibility tests pass. All 8 admin SPA tests pass. Full suite: 430 passed, 1 pre-existing failure (missing groupme_sdk — unrelated).

No issues found.

## Self-Review Minimal change, low risk. Two files touched: 1. **`AdminPlayerItem`** — added `is_public: bool` field to the Pydantic model 2. **Response builder** — added `is_public=player.is_public` to the `results.append()` call 3. **Test** — added `"is_public"` to the `test_response_fields` expected fields list All 33 visibility tests pass. All 8 admin SPA tests pass. Full suite: 430 passed, 1 pre-existing failure (missing `groupme_sdk` — unrelated). No issues found.
forgejo_admin deleted branch 111-player-visibility-api 2026-03-29 19:15:59 +00:00
Sign in to join this conversation.
No description provided.