21 lines
750 B
TypeScript
Executable File
21 lines
750 B
TypeScript
Executable File
import { NextResponse } from 'next/server'
|
|
|
|
export const dynamic = 'force-dynamic'
|
|
|
|
// DELETE /api/aos/licenses/[id] — DISABLED (GoBD).
|
|
//
|
|
// Licenses carry billing/subscription data and are accounting records.
|
|
// Per GoBD they may be CANCELLED but never deleted. Use the dedicated
|
|
// cancel flow at PATCH /api/aos/licenses/[id]/cancel instead — it sets
|
|
// status='cancelled', records cancellationEffectiveAt, and writes an
|
|
// AuditLog entry. The license row is retained indefinitely.
|
|
export async function DELETE() {
|
|
return NextResponse.json(
|
|
{
|
|
error: 'Lizenzen können nicht gelöscht werden (GoBD). Bitte über „Kündigen“ stornieren.',
|
|
useInstead: 'PATCH /api/aos/licenses/[id]/cancel',
|
|
},
|
|
{ status: 405 }
|
|
)
|
|
}
|