logger added

This commit is contained in:
Owen Rees
2023-06-22 17:03:01 +02:00
parent 2e5d122329
commit 195a2a98fc
6 changed files with 19 additions and 6 deletions
+2
View File
@@ -1,5 +1,6 @@
import clientPromise from "@/lib/mongodb";
import { dateOrderingFrance } from "@/utils/dbDateOrdering";
import { errorLog } from "@/utils/logger";
/**
* Tournament data API endpoint
@@ -22,6 +23,7 @@ export async function GET() {
return new Response(JSON.stringify(data), { status: 200, headers });
} catch (error) {
errorLog(error);
return new Response(JSON.stringify(error), { status: 500, headers });
}
}