feat(backend): admin-only list of every campaign on the instance, metadata only (#437) #538
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/437-admin-campaigns"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Backend half of #437 (#535 phase 4). The issue stays open for the admin screen, which lands in the rebuild's last lane.
What changes
GET /api/admin/campaignsin the admin router: every campaign on the instance regardless of the caller's membership, sorted case-insensitively by name with the id as a stable tie-break. Each row carries id, name, game system, the GMs in join order,gm_count(two-GM campaigns are the #411 shape), member and session counts,has_guild,has_notification_channel,discord_delivery_failing(true only when #369's status saysfailing; untested reads as false),retention_overridesholding only the fields actually set,is_archived,created_at,deleted_at. Soft-deleted campaigns are excluded unless?include_deleted=true.docs/API.md; unpaginated like the other admin lists. No migration; nothing on the bot contract.Two judgment calls, stated in the code:
session_countincludes cancelled sessions (it answers "how much does this campaign hold", unlike the participation stat in the admin user detail); the response models live inline inadmin.py, which is that file's existing convention.Verification (Docker): full backend suite 2,516 passed, 13 skipped (+12 new); ruff check and format clean.
🤖 Generated with Claude Code
80f49ab52e0f6177cafc