import { NextResponse } from "next/server";
import { listQueues } from "@/app/utils/sqs";

// Handle GET requests
export async function GET() {
  try {
    const queues = await listQueues(); // optionally pass a prefix
    return NextResponse.json({ queues }, { status: 200 });
  } catch (err: any) {
    console.error(err);
    return NextResponse.json({ error: err.message }, { status: 500 });
  }
}
