form action redirects user to tjhe appropriate year
This commit is contained in:
@@ -4,7 +4,7 @@ import { notFound } from 'next/navigation';
|
||||
export async function GET(request: Request, { params:{ id } }: { params: { id:string } }) {
|
||||
const [locationID, billID] = id.split('-');
|
||||
|
||||
const bill = await fetchBillById(locationID, billID);
|
||||
const [location, bill] = await fetchBillById(locationID, billID) ? [];
|
||||
|
||||
if(!bill?.attachment) {
|
||||
notFound();
|
||||
|
||||
Reference in New Issue
Block a user