import { sql } from "@/lib/db";

export async function GET() {
  try {
    const response = await sql`SELECT * FROM drivers`;

    return Response.json({ data: response });
  } catch (error) {
    console.log("[GET_DRIVERS]: ", error);

    return Response.json({ error }, { status: 500 });
  }
}
