Files
meet-hub/check-template.sql
dwindown 08e56a22d8 Fix send-auth-otp: Remove notification_logs references
- Remove notification_logs table references (table doesn't exist)
- This was causing the function to crash after sending email
- Now the function should complete successfully
- Added better email payload logging
- Keep .env file for local development
2026-01-02 15:07:41 +07:00

18 lines
593 B
SQL

-- Check if the email template exists and has content
SELECT
key,
name,
is_active,
email_subject,
LENGTH(email_body_html) as html_length,
SUBSTRING(email_body_html, 1, 500) as html_preview,
CASE
WHEN email_body_html IS NULL THEN 'NULL - empty template'
WHEN LENGTH(email_body_html) < 100 THEN 'TOO SHORT - template incomplete'
WHEN email_body_html LIKE '%<html>%' THEN 'Has HTML tag'
WHEN email_body_html LIKE '%---%' THEN 'Has YAML delimiters'
ELSE 'Unknown format'
END as template_status
FROM notification_templates
WHERE key = 'auth_email_verification';