fix: submitAnnotations server action missing directive and invalid mail options

This commit is contained in:
2026-06-19 15:21:20 +02:00
parent 2ecbe9c63c
commit c2a82ae9ae
3 changed files with 13 additions and 15 deletions

View File

@@ -1,3 +1,5 @@
'use server';
import { sendEmail } from '@/lib/mail/mailer';
import { getServerAppServices } from '@/lib/services/create-services.server';
@@ -23,20 +25,16 @@ export async function submitAnnotations(annotations: any[]) {
</li>
`).join('')}
</ul>
<p><i>Die genauen Daten (inkl. Scroll-Positionen, Viewport und Zeitstempel) befinden sich im JSON-Anhang.</i></p>
<p><i>Die genauen Daten (inkl. Scroll-Positionen, Viewport und Zeitstempel) befinden sich hier:</i></p>
<pre style="background: #f4f4f4; padding: 10px; border-radius: 5px; font-size: 12px; overflow-x: auto;">
${jsonContent}
</pre>
`;
const notificationResult = await sendEmail({
replyTo: 'info@e-tib.com', // Falls Rückfragen nötig
subject: `[Korrekturen] ${annotations.length} neue Anmerkungen für E-TIB`,
html: htmlContent,
attachments: [
{
filename: 'corrections.json',
content: jsonContent,
contentType: 'application/json',
}
]
html: htmlContent
});
if (!notificationResult.success) {