mirror of
https://github.com/TheRealOwenRees/echecsfrance.git
synced 2026-07-23 12:36:57 +00:00
logger added
This commit is contained in:
@@ -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 });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user