Skip to content

Commit

Permalink
add example query
Browse files Browse the repository at this point in the history
  • Loading branch information
correttojs committed Nov 19, 2024
1 parent e73e821 commit 4111526
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions dashboard/starter-example/app/query/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// import { db } from "@vercel/postgres";

// const client = await db.connect();

// async function listInvoices() {
// const data = await client.sql`
// SELECT invoices.amount, customers.name
// FROM invoices
// JOIN customers ON invoices.customer_id = customers.id
// WHERE invoices.amount = 666;
// `;

// return data.rows;
// }

export async function GET() {
return Response.json({
message:
"Uncomment this file and remove this line. You can delete this file when you are finished.",
});
// try {
// return Response.json(await listInvoices());
// } catch (error) {
// return Response.json({ error }, { status: 500 });
// }
}

0 comments on commit 4111526

Please sign in to comment.