Fix lint debt from admin overhaul; make check/lint/test/build green

- Scope @typescript-eslint/no-explicit-any off for *.spec.ts test doubles
- Type enhance() submit callbacks with SubmitFunction in api-keys page
- Drop as-any casts in proclamations upsert by using typed form data
- Fix useless regex escapes in profiles phone validation
- Remove unused locals param from api-keys load
- Use resolve() for admin nav/error links; store literal hrefs in adminModels
- Update README admin section and ADMIN_OVERHAUL lint caveat
This commit is contained in:
NeilClack
2026-09-10 09:43:16 -05:00
parent 91d162c746
commit 5e8851e070
10 changed files with 64 additions and 38 deletions
+15 -14
View File
@@ -36,18 +36,19 @@ podman push registry.digitalocean.com/radiantwave-portal-container-registry/port
## Admin
Admin CRUD pages at `/admin`. 9 models have per-page routes with modals for create/edit:
Admin pages live under `/admin` (requires `roleId <= 3`); `/admin` redirects to
`/admin/profiles`. Each route owns its own form and modal logic, built on the shared
`DataTable.svelte` and `AdminModal.svelte` components. The generic `$lib/svelte-admin`
CRUD layer has been removed; see `docs/ADMIN_OVERHAUL.md` for the migration notes.
| Included | Excluded |
| ------------------------ | --------------------------------- |
| users | Session (Better Auth) |
| profiles | Account (Better Auth) |
| addresses | Verification (Better Auth) |
| user-roles | UserProclamations (composite key) |
| proclamations | |
| solfeggio-frequencies | |
| proclamation-categories | |
| license-keys (list-only) | |
| subscription-levels | |
See `src/lib/svelte-admin/README.md` for architecture and configuration docs.
| Route | Notes |
| -------------------------------- | ------------------------ |
| `/admin/users` | Name, Email, Role |
| `/admin/profiles` | Reference implementation |
| `/admin/user-roles` | |
| `/admin/proclamations` | Super-only content edits |
| `/admin/solfeggio-frequencies` | |
| `/admin/proclamation-categories` | Draggable reorder |
| `/admin/proclamation-groups` | Draggable reorder |
| `/admin/license-keys` | List-only + rotate |
| `/admin/api-keys` | Super-only key rotation |