Upgrade packages in next-learn/dashboard (#1061)

* chore: Bump packages in starter-example

* chore: Bump packages in final-example

* chore: allow bcrypt to build

* chore: prettier fixes
This commit is contained in:
Joseph
2025-05-22 11:30:38 +02:00
committed by GitHub
parent 4dfc687b2b
commit 3829633600
5 changed files with 529 additions and 486 deletions

View File

@@ -3,14 +3,14 @@ import postgres from 'postgres';
const sql = postgres(process.env.POSTGRES_URL!, { ssl: 'require' });
async function listInvoices() {
const data = await sql`
const data = await sql`
SELECT invoices.amount, customers.name
FROM invoices
JOIN customers ON invoices.customer_id = customers.id
WHERE invoices.amount = 666;
`;
return data;
return data;
}
export async function GET() {
@@ -19,8 +19,8 @@ export async function GET() {
// 'Uncomment this file and remove this line. You can delete this file when you are finished.',
// });
try {
return Response.json(await listInvoices());
return Response.json(await listInvoices());
} catch (error) {
return Response.json({ error }, { status: 500 });
return Response.json({ error }, { status: 500 });
}
}