React 19 stable. (#946)

This commit is contained in:
Lee Robinson
2024-12-05 15:22:59 -06:00
committed by GitHub
parent 0e41ddce78
commit c5f12f9e3c
5 changed files with 166 additions and 205 deletions

View File

@@ -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(