Add factory reset admin endpoint and use it in smoke test

This commit is contained in:
2026-01-28 15:02:24 +01:00
parent 37c3eed552
commit 44514f8ecc
4 changed files with 32 additions and 3 deletions

View File

@@ -42,8 +42,8 @@ function Invoke-Json {
Write-Host "1) Health check"
Invoke-Json -Method GET -Path "/health" | Out-Host
Write-Host "`n2) Admin reset"
Invoke-Json -Method POST -Path "/api/admin/reset" -Headers @{ "X-Admin-Key" = $AdminKey } | Out-Host
Write-Host "`n2) Admin factory reset (clears players, suggestions, votes)"
Invoke-Json -Method POST -Path "/api/admin/factory-reset" -Headers @{ "X-Admin-Key" = $AdminKey } | Out-Host
Write-Host "`n3) Set player name"
$me = Invoke-Json -Method POST -Path "/api/me/name" -Body @{ name = "SmokeTester" }