
import { NextResponse } from "next/server";
import { scanAllLibraries } from "@/lib/scanner";

export async function POST() {
  try {
    await scanAllLibraries();
    return NextResponse.json({ message: "Scan complete" });
  } catch (error: any) {
    return NextResponse.json({ error: error.message }, { status: 500 });
  }
}
