implemente bill add

This commit is contained in:
2024-01-05 14:20:00 +01:00
parent 73029fb28a
commit 245cc38717
9 changed files with 69 additions and 46 deletions

View File

@@ -0,0 +1,12 @@
import { deleteBillById } from '@/app/lib/actions';
import { notFound, redirect } from 'next/navigation';
export default async function Page({ params:{ id } }: { params: { id:string } }) {
const [locationID, billID] = id.split('-');
if(await deleteBillById(locationID, billID) === 0) {
return(notFound());
}
redirect(`/`);
}