Audit Log
Every dashboard write is recorded: searchable, scoped, and inspectable.
What's logged
- Feature toggles (
feature.toggle) - Per-feature config writes (
verification.config,economy.currency, …) - Embed builder sends (
embed.send,embed.template.save) - Role-menu / reaction-role mutations
- Scope grants on dashboard roles
- Manual economy adjustments, with amount + reason
What each entry contains
| Field | Source |
|---|---|
| actor_user_id | The OAuth-authenticated Discord user. |
| action | Stable string identifier (e.g. tickets.panel.toggle). |
| target_type / target_id | Optional pointer to the affected row (panel id, role id, …). |
| before / after | JSONB snapshots of the row pre- and post-write. |
| ip_address | From X-Forwarded-For when set, otherwise the socket peer. |
| user_agent | Truncated to 512 chars. |
| created_at | UTC. |
Where to read it
- Server overview → Audit log (last 200, all features).
- Each feature detail page shows the last 10 entries scoped to that feature.
- JSON:
GET /api/server/<id>/audit-log?feature=<key>&limit=200.