fix: submitAnnotations server action missing directive and invalid mail options
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user