v1.3.1: Fix symbol loading, DEL key, SOMA/Pendenzen in rapport, improved onboarding, org settings tab, logo upload

This commit is contained in:
Pepe Ziberi
2026-02-25 22:28:10 +01:00
parent 5917fa88ad
commit 708bdf6be0
17 changed files with 570 additions and 55 deletions

View File

@@ -17,9 +17,13 @@ export async function GET(req: NextRequest) {
id: true,
name: true,
slug: true,
description: true,
contactEmail: true,
contactPhone: true,
address: true,
logoUrl: true,
plan: true,
subscriptionStatus: true,
contactEmail: true,
privacyAccepted: true,
privacyAcceptedAt: true,
adminAccessAccepted: true,
@@ -39,3 +43,35 @@ export async function GET(req: NextRequest) {
return NextResponse.json({ error: 'Serverfehler' }, { status: 500 })
}
}
export async function PATCH(req: NextRequest) {
try {
const user = await getSession()
if (!user) return NextResponse.json({ error: 'Nicht autorisiert' }, { status: 401 })
if (user.role !== 'TENANT_ADMIN') return NextResponse.json({ error: 'Nur Admin' }, { status: 403 })
if (!user.tenantId) return NextResponse.json({ error: 'Kein Mandant' }, { status: 400 })
const body = await req.json()
const { name, description, contactEmail, contactPhone, address } = body
if (!name || !name.trim()) {
return NextResponse.json({ error: 'Name darf nicht leer sein' }, { status: 400 })
}
const updated = await (prisma as any).tenant.update({
where: { id: user.tenantId },
data: {
name: name.trim(),
description: description || null,
contactEmail: contactEmail || null,
contactPhone: contactPhone || null,
address: address || null,
},
})
return NextResponse.json({ tenant: updated })
} catch (error: any) {
console.error('[Tenant Info PATCH] Error:', error?.message)
return NextResponse.json({ error: 'Serverfehler' }, { status: 500 })
}
}