import { NextResponse } from 'next/server';
import { listPhoneNumbers } from '@/lib/twilio-client';

export async function GET() {
  try {
    const numbers = await listPhoneNumbers();
    return NextResponse.json(numbers);
  } catch (err) {
    console.error('Failed to list Twilio numbers:', err);
    return NextResponse.json([], { status: 200 });
  }
}
