21 lines
534 B
TypeScript
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),
|
|
});
|
|
}
|