import { NextResponse } from "next/server"; import { withAuth } from "@/lib/api-auth"; import { requestFolderScan } from "@/lib/local-folders"; /** Ask the worker to rescan the models folder for importable folders. */ export const POST = withAuth(async () => { await requestFolderScan(); return new NextResponse(null, { status: 202 }); });