mirror of
https://github.com/OpenSquawk/OpenSquawk
synced 2026-08-10 11:33:26 +08:00
Format admin notifications with unified subject prefix
This commit is contained in:
@@ -37,12 +37,16 @@ export default defineEventHandler(async (event) => {
|
||||
})
|
||||
|
||||
if (result.created) {
|
||||
const lines = [
|
||||
`E-Mail: ${email}`,
|
||||
name ? `Name: ${name}` : null,
|
||||
`Quelle: ${source}`,
|
||||
].filter(Boolean)
|
||||
await sendAdminNotification('[OpenSquawk] Neue Updates-Liste', lines.join('\n'))
|
||||
const dataEntries = [
|
||||
['E-Mail', email],
|
||||
['Name', name || null],
|
||||
['Quelle', source],
|
||||
]
|
||||
await sendAdminNotification({
|
||||
event: 'Neue Updates-Liste',
|
||||
summary: `Neue Updates-Anmeldung: ${email}`,
|
||||
data: dataEntries,
|
||||
})
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user