import { NextResponse } from 'next/server';

const TRIP_SERVICE_URL = 'http://trip-service.ai-agents.svc.cluster.local:6002';

export async function POST(req, { params }) {
  try {
    const res = await fetch(`${TRIP_SERVICE_URL}/trips/${params.id}/test`, {
      method: 'POST'
    });
    const data = await res.json();
    return NextResponse.json(data);
  } catch (error) {
    return NextResponse.json({ error: error.message }, { status: 500 });
  }
}
