From fe8ba137e0d09202f75be09a9242945c3efeebc2 Mon Sep 17 00:00:00 2001 From: Frank Tovar Date: Wed, 28 Jan 2026 17:13:03 +0100 Subject: [PATCH] Update smoke test and docs for suggestion delete endpoint --- AGENTS.md | 1 + API.md | 1 + scripts/smoke.ps1 | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index e177fec..0cf4a8c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -61,6 +61,7 @@ Do not introduce MVC controllers, Razor Pages, Blazor, or SPA frameworks. 7. Results phase (aggregated leaderboard) 8. Admin controls (phase switch, reset) 9. Factory reset (clear all data including players) for fresh testing/deploy +10. Suggest delete (players can delete their own suggestions during Suggest phase) --- diff --git a/API.md b/API.md index 58fccdd..a2b4771 100644 --- a/API.md +++ b/API.md @@ -12,6 +12,7 @@ POST /api/me/name ## Suggestions GET /api/suggestions/mine POST /api/suggestions +DELETE /api/suggestions/{id} GET /api/suggestions/all ## Votes diff --git a/scripts/smoke.ps1 b/scripts/smoke.ps1 index 2913b28..a7f3187 100644 --- a/scripts/smoke.ps1 +++ b/scripts/smoke.ps1 @@ -61,6 +61,10 @@ $ids = @() $resp | Out-Host } +Write-Host "`n4b) Delete the third suggestion (Suggest phase only)" +Invoke-Json -Method DELETE -Path "/api/suggestions/$($ids[2])" | Out-Host +$ids = $ids[0..1] + Write-Host "`n5) Reveal phase" Invoke-Json -Method POST -Path "/api/admin/phase" -Headers @{ "X-Admin-Key" = $AdminKey } -Body @{ phase = "Reveal" } | Out-Host Invoke-Json -Method GET -Path "/api/suggestions/all" | Out-Host