feat(termine+matrix): Nutzer-Termin-Einreichung (Draft) + Matrix-Notifications
Deploy / verify (push) Successful in 1m32s
Deploy / deploy (push) Successful in 1m54s

- /termin-melden: öffentliches Formular → /api/termin legt calendar_item als
  Draft an (scoped Write-Key), Admin bestätigt per draft→published
- /api/cms-webhook: empfängt RustyCMS-Webhooks (X-Webhook-Secret) → Matrix
- src/lib/server/matrix.ts: notifyMatrix() Helper
- Form-Proxies (stellungnahme/contact/newsletter/mitmachen) pingen Matrix
- deploy.yml: Matrix/Webhook/Termin-Key Env-Vars

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Peter Meier
2026-06-29 10:32:36 +02:00
parent 5b5fe8789e
commit ca4dfad8be
9 changed files with 390 additions and 0 deletions
+4
View File
@@ -2,6 +2,7 @@ import { json } from "@sveltejs/kit";
import { env as publicEnv } from "$env/dynamic/public";
import { env as privateEnv } from "$env/dynamic/private";
import type { RequestHandler } from "./$types";
import { notifyMatrix } from "$lib/server/matrix";
import {
HONEYPOT_FIELDS,
LIMITS,
@@ -123,6 +124,9 @@ export const POST: RequestHandler = async ({ request, getClientAddress }) => {
}
if (res.ok) {
void notifyMatrix(
`✉️ Neue Kontakt-Nachricht von ${payload.name} (${payload.email})${payload.subject ? `: ${payload.subject}` : ""}`,
);
return json({ ok: true }, { status: 201 });
}
if (res.status === 429) {