import { NextResponse } from 'next/server'; import { setInstrumentEnabled } from '@/lib/db'; export async function PATCH( request: Request, { params }: { params: Promise<{ symbol: string }> } ) { const { symbol } = await params; const body = await request.json(); const ok = setInstrumentEnabled(symbol, !!body.enabled); if (!ok) return NextResponse.json({ error: 'Not found' }, { status: 404 }); return NextResponse.json({ symbol, enabled: !!body.enabled }); }