Set cards as default view and restrict contact data to vorstand only

This commit is contained in:
Torsten Schulz (local)
2025-10-21 14:42:20 +02:00
parent bd677c26ae
commit 37994f39b2
21 changed files with 610 additions and 515 deletions

View File

@@ -38,16 +38,17 @@ const members_post = defineEventHandler(async (event) => {
});
}
const body = await readBody(event);
const { id, name, email, phone, address, notes } = body;
if (!name) {
const { id, firstName, lastName, email, phone, address, notes } = body;
if (!firstName || !lastName) {
throw createError({
statusCode: 400,
message: "Name ist erforderlich."
message: "Vorname und Nachname sind erforderlich."
});
}
await saveMember({
id: id || void 0,
name,
firstName,
lastName,
email: email || "",
phone: phone || "",
address: address || "",