NeilClack 23e232d5ea fix: license key not showing in email when created via admin page
Problem:
The admin createKey action had two issues preventing the license key from
appearing in the delivery email:

1. Wrong variable name: passed 'licenseKey' (camelCase) but the Resend
   template expects 'license_key' (snake_case).

2. Wrong template: used the default RESEND_TEMPLATE_ID (a generic
   template) instead of the 'license-key-delivery' template that the
   automation endpoint uses for license key emails.

Solution:
- Changed template variable from 'licenseKey' to 'license_key'
- Added explicit templateId: 'license-key-delivery' to match the
  automation endpoint (api/v1/automations/create/account)
- Updated email subject to 'Your Rhemawave License Key' for consistency

Tests:
Added page.server.spec.ts for the admin license-keys createKey action
covering: unauthenticated rejection, missing email/level validation,
user-not-found error, successful key creation with correct template ID
and license_key variable, fallback to user.name when profile is missing,
and graceful handling when email sending fails.
2026-07-18 15:46:41 -05:00
2026-07-16 20:23:59 -05:00
2026-02-24 12:08:01 -06:00
2026-07-06 21:04:11 -05:00
2026-07-06 21:01:41 -05:00
2026-01-13 16:21:12 -06:00
2026-01-13 16:21:12 -06:00
2026-07-16 20:23:59 -05:00
2026-07-16 20:23:59 -05:00
2026-01-13 16:21:12 -06:00
2026-01-20 08:40:05 -06:00
2026-01-13 16:21:12 -06:00
2026-01-13 16:21:12 -06:00

Rhema Wave Technologies - User Portal

SvelteKit 2 + Svelte 5 + Tailwind CSS v4 + Prisma 7 + PostgreSQL + Better-Auth.

Admin

Admin CRUD pages at /admin. 9 models have per-page routes with modals for create/edit:

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.

S
Description
No description provided
Readme
2 MiB
Languages
TypeScript 89.3%
Svelte 9.5%
HTML 1%
Dockerfile 0.1%