generated from coulomb/repo-seed
fix(api): normalize trailing slashes — no slash on param routes
Rule: trailing slash only on collection roots (/). Any route containing
a path parameter {…} uses no trailing slash. Applies across all routers,
scripts, Makefile, and tests. Fixes 307-redirect fragility on POST/PATCH
from naive clients (curl, Codex HTTP calls).
Also adds POST /repos/{slug}/sync — runs ADR-001 consistency check with
--fix via HTTP, so non-MCP agents (Codex) can self-service DB sync without
operator intervention.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -78,7 +78,7 @@ async def create_contribution(
|
||||
return contrib
|
||||
|
||||
|
||||
@router.get("/{contribution_id}/", response_model=ContributionRead)
|
||||
@router.get("/{contribution_id}", response_model=ContributionRead)
|
||||
async def get_contribution(
|
||||
contribution_id: uuid.UUID,
|
||||
session: AsyncSession = Depends(get_session),
|
||||
@@ -118,7 +118,7 @@ async def patch_contribution_status(
|
||||
return contrib
|
||||
|
||||
|
||||
@router.delete("/{contribution_id}/", status_code=status.HTTP_204_NO_CONTENT)
|
||||
@router.delete("/{contribution_id}", status_code=status.HTTP_204_NO_CONTENT)
|
||||
async def withdraw_contribution(
|
||||
contribution_id: uuid.UUID,
|
||||
session: AsyncSession = Depends(get_session),
|
||||
|
||||
Reference in New Issue
Block a user