store: PR review: paper-dynasty-database#43 — FastAPI int type annotations on path params

This commit is contained in:
Cal Corum 2026-03-03 16:48:00 -06:00
parent d22d9f02f2
commit bbb65a9099

View File

@ -0,0 +1,31 @@
---
id: 07eb63c2-1823-4f26-b976-a725ea5ab324
type: workflow
title: "PR review: paper-dynasty-database#43 — FastAPI int type annotations on path params"
tags: [pr-reviewer, paper-dynasty-database, fastapi, type-annotations, python, peewee]
importance: 0.4
confidence: 0.8
created: "2026-03-03T22:48:00.357115+00:00"
updated: "2026-03-03T22:48:00.357115+00:00"
---
## PR #43 Review — APPROVED
**Repo**: cal/paper-dynasty-database
**Branch**: ai/paper-dynasty-database#27 → next-release
**Title**: fix: add type annotations to untyped path parameters (#27)
### Changes Reviewed
- `app/routers_v2/packs.py:112``get_one_pack(pack_id: int, ...)`
- `app/routers_v2/players.py:590``get_one_player(player_id: int, ...)`
- `app/routers_v2/players.py:1122``delete_player(player_id: int, ...)`
- `app/routers_v2/teams.py:179``get_one_team(team_id: int, ...)`
### Verdict: APPROVED (posted as COMMENT — Gitea blocks self-approval)
All four changes are minimal, correct, and follow FastAPI conventions. Adding `: int` type hints to path parameters enables FastAPI's built-in validation (returns 422 on non-integer input) instead of letting string values reach the Peewee ORM and raise unhandled exceptions. Positive security improvement.
### Notes
- No tests exist in this repo (expected)
- Suggestion filed: other routers (gauntlets, scouting) may have similar untyped path params worth fixing in a follow-up
- Gitea does not allow self-approval; reviewer must post as COMMENT when PR author == reviewer account