Skip to content

Manage match outcome reasons and filter APIs (#141: part 2) - #202

Open
tanman1049 wants to merge 7 commits into
stagingfrom
feature/admin-outcome-reason-catalog
Open

Manage match outcome reasons and filter APIs (#141: part 2)#202
tanman1049 wants to merge 7 commits into
stagingfrom
feature/admin-outcome-reason-catalog

Conversation

@tanman1049

@tanman1049 tanman1049 commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the admin-managed, per-competition outcome-reason catalog and exposes the public APIs required for match-history filtering.

Related to #141. Builds on #187, which added storage for map codes and raw outcome-reason codes.

Catalog and admin management

  • Adds the game_match_outcome_reasons catalog table.
  • Stores a stable code, editable display label, and visibility setting per competition.
  • Seeds timeout and code_error for existing and newly created competitions.
  • Adds admin endpoints to list, create, and update outcome reasons.
  • Prevents duplicate (competition, code) pairs.
  • Removes catalog rows when their competition is deleted.

Public match-history API

  • Adds GET /api/v1/public/game-match/filter-options.
  • Returns maps present in a competition’s matches.
  • Returns visible, admin-defined outcome reasons.
  • Indicates when unregistered outcome codes exist, allowing the UI to offer Other.
  • Adds mapCode, outcomeReasonCode, and unregisteredOutcomeReason filters to public match-history search.
  • Includes map and outcome-reason codes in match DTOs.

Behavior

Unregistered outcome codes do not block finalization, win/loss processing, or Glicko updates. They remain queryable through Other.

Tests

Adds unit coverage for catalog management and filter-option construction, plus integration coverage for map, named-reason, and Other filters.

@tanman1049 tanman1049 changed the title Manage match outcome reason catalog (#141: part 2 of 3) Manage match outcome reasons and filter APIs (#141: part 2) Sep 5, 2026
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