import { NextResponse } from 'next/server'; import { CarRepository } from '../../../../backend/repositories/CarRepository'; const carRepository = new CarRepository(); export async function GET() { try { const brands = await carRepository.getAllBrands(); return NextResponse.json(brands); } catch (error) { console.error('Error fetching brands:', error); return NextResponse.json( { error: 'Failed to fetch brands' }, { status: 500 } ); } }