Files
place4bees.com/frontend/src/lib/contact.ts
T
2026-09-17 16:02:51 +02:00

21 lines
534 B
TypeScript

import { medusaFetch } from "./medusa";
export interface ContactRequest {
quelle: string;
name: string;
email: string;
nachricht: string;
datenschutz: boolean;
/** Die unsichtbare Falle. Bleibt beim Menschen leer. */
website?: string;
seite?: string;
}
/** Schickt eine Anfrage an den Shop. Wirft mit der Meldung des Backends. */
export async function sendContactRequest(anfrage: ContactRequest): Promise<void> {
await medusaFetch("/store/contact", {
method: "POST",
body: JSON.stringify(anfrage),
});
}