Fix API token mapping and add extensive debug logging

- Fixed api_token vs mailketing_api_token column mapping
- Added comprehensive debug logging to send-auth-otp
- Added fallback logic for missing settings fields
- Improved error messages for troubleshooting

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
dwindown
2026-01-02 14:31:23 +07:00
parent 219ad11202
commit 06d6845456
5 changed files with 249 additions and 4 deletions

20
check_template.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
# Test query to check if template exists and what's in the table
# Run this in your Supabase SQL editor or via psql
echo "=== Check if template exists ==="
cat << 'SQL'
-- Check if template exists
SELECT key, name, is_active
FROM notification_templates
WHERE key = 'auth_email_verification';
-- Check all templates
SELECT key, name, is_active
FROM notification_templates
ORDER BY key;
-- Check table structure
\d notification_templates;
SQL