mirror of
https://github.com/vercel/next-learn.git
synced 2026-07-01 16:44:30 +00:00
React 19 stable. (#946)
This commit is contained in:
@@ -108,15 +108,8 @@ export async function updateInvoice(
|
||||
}
|
||||
|
||||
export async function deleteInvoice(id: string) {
|
||||
// throw new Error('Failed to Delete Invoice');
|
||||
|
||||
try {
|
||||
await sql`DELETE FROM invoices WHERE id = ${id}`;
|
||||
revalidatePath('/dashboard/invoices');
|
||||
return { message: 'Deleted Invoice' };
|
||||
} catch (error) {
|
||||
return { message: 'Database Error: Failed to Delete Invoice.' };
|
||||
}
|
||||
await sql`DELETE FROM invoices WHERE id = ${id}`;
|
||||
revalidatePath('/dashboard/invoices');
|
||||
}
|
||||
|
||||
export async function authenticate(
|
||||
|
||||
Reference in New Issue
Block a user