feat: send notifications when subscription tier changes (#59) #63

Merged
egullickson merged 4 commits from issue-59-tier-change-notifications into main 2026-02-01 02:38:21 +00:00
Showing only changes of commit 706851f396 - Show all commits

View File

@@ -0,0 +1,26 @@
/**
* Migration: Fix subscription tier change email template
* @ai-summary Fixes template to use simple variable substitution instead of conditionals
* @ai-context TemplateService only supports {{variable}}, not Handlebars conditionals
*/
-- Update the existing template to use simple variable substitution
UPDATE email_templates
SET
body = 'Hi {{userName}},
Your MotoVaultPro subscription has been {{changeType}}.
Previous Tier: {{previousTier}}
New Tier: {{newTier}}
Reason: {{reason}}
{{additionalInfo}}
If you have any questions, please contact support.
Best regards,
MotoVaultPro Team',
variables = '["userName", "changeType", "previousTier", "newTier", "reason", "additionalInfo"]',
updated_at = NOW()
WHERE template_key = 'subscription_tier_change';