fix(andreknie.de): close package two review gaps
This commit is contained in:
@@ -62,11 +62,7 @@ export async function sendStakeholderNotification(type, data) {
|
||||
'resource-download': `Ressourcenanfrage von ${data.name}`,
|
||||
}
|
||||
|
||||
const body = [
|
||||
'Bitte die angefragten Inhalte prüfen und bei positiver Prüfung ein aktuelles Profil von André verschicken.',
|
||||
'',
|
||||
...Object.entries(data).map(([key, val]) => `${key}: ${val}`),
|
||||
].join('\n')
|
||||
const body = buildStakeholderMessage(type, data)
|
||||
|
||||
await t.sendMail({
|
||||
from: SMTP_USER,
|
||||
@@ -76,6 +72,17 @@ export async function sendStakeholderNotification(type, data) {
|
||||
})
|
||||
}
|
||||
|
||||
export function buildStakeholderMessage(type, data) {
|
||||
const fields = Object.entries(data).map(([key, val]) => `${key}: ${val}`)
|
||||
if (type !== 'resource-download') return fields.join('\n')
|
||||
|
||||
return [
|
||||
'Bitte die angefragten Inhalte prüfen und bei positiver Prüfung ein aktuelles Profil von André verschicken.',
|
||||
'',
|
||||
...fields,
|
||||
].join('\n')
|
||||
}
|
||||
|
||||
export { STAKEHOLDER_EMAIL, BASE_URL }
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user