Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add example query #927

Merged
merged 2 commits into from
Nov 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 });
// }
}
Loading