Add --json to polls list and polls show
CI / Deploy / PHP 8.5 (push) Successful in 1m37s
CI / Deploy / PHP 8.4 (push) Successful in 1m39s
CI / Deploy / test (push) Successful in 2s
CI / Deploy / deploy (push) Skipped

Machine-readable output for scripts; never contains the admin token
unless --link is given.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Sonnet 5.5 committed 2026-11-16 13:59:38 +01:00
1 parent 664088e139
commit 3d6ade668f
6 files changed
+115 -2

No files matched your search

+6 -2
View File
@@ -125,8 +125,8 @@ und fragen nach, jede Eingabe hat eine sichere Vorgabe (Zurück/Nein). Für Skri
| Befehl | Zweck |
|---|---|
| `bin/cake polls` | Menü (interaktiv) |
| `bin/cake polls list [--expired] [--email=text] [--sort=created\|activity\|title]` | Umfragen mit E-Mail, Ablaufdatum und Erinnerung |
| `bin/cake polls show <id\|code> [--link]` | Details; mit `--link` auch der geheime Admin-Link (nur auf Wunsch) |
| `bin/cake polls list [--expired] [--email=text] [--sort=created\|activity\|title] [--json]` | Umfragen mit E-Mail, Ablaufdatum und Erinnerung |
| `bin/cake polls show <id\|code> [--link] [--json]` | Details; mit `--link` auch der geheime Admin-Link (nur auf Wunsch) |
| `bin/cake polls delete <id\|code> [--yes]` | Eine Umfrage samt Folien, Antworten und Bildern löschen (fragt nach) |
| `bin/cake polls remind [--dry-run]` | Erinnerungsmails für bald ablaufende Umfragen (je Umfrage einmal) |
| `bin/cake polls cleanup [--dry-run]` | Der Cronjob: erst erinnern, dann abgelaufene Umfragen löschen, danach verwaiste Bilddateien |
@@ -137,6 +137,10 @@ einmalig eine Mail mit Ablaufdatum und Admin-Link, um die Ergebnisse als PDF zu
der Anlege-Mail und im Dashboard (Karte „Sicherheit“). Es wird berechnet, eine Änderung der Einstellung gilt also sofort
für alle Umfragen.
Mit `--json` geben `polls list` und `polls show` statt der Tabelle bzw. des Texts reines JSON aus (Datumswerte als
ISO 8601, ohne weitere Ausgabe), z. B. für `jq`: `bin/cake polls list --json --expired | jq '.[].email'`. Der Admin-Link
steht auch dort nur mit `--link` (`adminUrl`, sonst `null`).
### Cronjob einrichten
Ein einziger täglicher Cronjob erledigt Erinnern, Löschen und Bild-Aufräumen (`polls cleanup`). Ohne ihn läuft keine