add library management

This commit is contained in:
2026-03-25 16:40:01 -04:00
parent ff3cfe7ec3
commit 90528c4768
9 changed files with 552 additions and 53 deletions

View File

@@ -0,0 +1,17 @@
import { NextRequest, NextResponse } from 'next/server'
import { getLibrary, removeLibrary } from '@/lib/libraries'
export async function DELETE(
_request: NextRequest,
{ params }: { params: Promise<{ id: string }> }
) {
const { id } = await params
const library = getLibrary(id)
if (!library) {
return NextResponse.json({ error: 'Library not found' }, { status: 404 })
}
removeLibrary(id)
return new NextResponse(null, { status: 204 })
}