mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-21 15:31:12 -05:00
Fix hardcoded sender display name
This commit is contained in:
@@ -69,6 +69,7 @@ const handler = async (req: Request): Promise<Response> => {
|
|||||||
|
|
||||||
// Get admin email from environment variable
|
// Get admin email from environment variable
|
||||||
const adminEmail = Deno.env.get('ADMIN_EMAIL_ADDRESS') || 'admins@thrillwiki.com';
|
const adminEmail = Deno.env.get('ADMIN_EMAIL_ADDRESS') || 'admins@thrillwiki.com';
|
||||||
|
const adminDisplayName = Deno.env.get('ADMIN_EMAIL_DISPLAY_NAME') || 'ThrillWiki Admin';
|
||||||
|
|
||||||
// Fetch admin's profile for signature
|
// Fetch admin's profile for signature
|
||||||
const { data: adminProfile } = await supabase
|
const { data: adminProfile } = await supabase
|
||||||
@@ -147,7 +148,7 @@ const handler = async (req: Request): Promise<Response> => {
|
|||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
},
|
},
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
from: `ThrillWiki Admin <${adminEmail}>`,
|
from: `${adminDisplayName} <${adminEmail}>`,
|
||||||
to: `${submission.name} <${submission.email}>`,
|
to: `${submission.name} <${submission.email}>`,
|
||||||
subject: finalSubject,
|
subject: finalSubject,
|
||||||
text: finalReplyBody,
|
text: finalReplyBody,
|
||||||
|
|||||||
Reference in New Issue
Block a user