managarten/services/cards-server/src/routes
Till JS c05022611e feat(cards): Phase η.1 — Reports + admin moderation actions
Server (cards-server):
- ModerationService: createReport, listOpen, resolveReport,
  takedownDeck, banAuthor, setVerifiedMana, restoreDeck. Takedown
  also auto-closes any sibling open reports against the deck and
  closes any open PRs (so contributors see clean state). Ban
  cascades to all of the author's decks.
- routes/moderation.ts: POST /v1/reports (any authed user),
  GET /v1/admin/reports (admin only), POST /v1/admin/reports/:id/
  resolve, POST /v1/admin/decks/:slug/{takedown,restore}, POST
  /v1/admin/authors/:slug/verify. Admin gate is `role === 'admin'`
  for now — verified-mana-only mods land later.
- Notify hooks: takedown emails the deck owner, mana-verify status
  change emails the author.

Frontend (cards-web):
- <ReportButton> (icon or inline variant) with category picker
  + optional explanation. On /d/<slug> as a discreet 🚩 next to
  the published-date stamp; in <CardDiscussions> per non-own
  comment.
- /d/<slug> shows a red "wurde von der Moderation entfernt" banner
  when isTakedown is true.
- /admin/reports inbox: lists open reports with category badges,
  Abweisen / Deck entfernen / Author bannen actions. Renders a
  forbidden state if the current user isn't admin.
2026-05-07 23:24:23 +02:00
..
authors.ts feat(cards-server): Phase γ — public reads + browse + search + engagement 2026-05-07 17:01:32 +02:00
decks.ts feat(cards): Phase ζ.1 — Paid decks via mana-credits 2026-05-07 23:10:18 +02:00
discussions.ts feat(cards): Phase ε.4 — Card list + discussions on /d/<slug> 2026-05-07 22:46:47 +02:00
engagement.ts feat(cards-server): Phase γ — public reads + browse + search + engagement 2026-05-07 17:01:32 +02:00
explore.ts feat(cards-server): Phase γ — public reads + browse + search + engagement 2026-05-07 17:01:32 +02:00
health.ts feat(cards-server): Phase α — service skeleton + 16-table schema 2026-05-07 16:01:08 +02:00
moderation.ts feat(cards): Phase η.1 — Reports + admin moderation actions 2026-05-07 23:24:23 +02:00
pull-requests.ts feat(cards): Phase ε — Pull-Requests + Card-Discussions 2026-05-07 21:56:20 +02:00
purchases.ts feat(cards): Phase ζ.1 — Paid decks via mana-credits 2026-05-07 23:10:18 +02:00
subscriptions.ts feat(cards-server): Phase δ.1 — subscriptions + version reads + smart-merge diff 2026-05-07 19:33:58 +02:00