futher booking stuff

This commit is contained in:
PxlLoewe
2025-09-20 22:16:23 +02:00
parent ba027957ce
commit cf199150fe
8 changed files with 50 additions and 58 deletions

View File

@@ -33,7 +33,7 @@ export const GET = async (req: NextRequest) => {
return NextResponse.json(
bookings.map((b) => ({
...b,
user: b.User && getPublicUser(b.User),
User: b.User ? getPublicUser(b.User) : null,
})),
);
} catch (error) {

View File

@@ -24,7 +24,7 @@ export const GET = async () => {
},
});
return NextResponse.json({ stations });
return NextResponse.json(stations);
} catch (error) {
console.error("Error fetching stations:", error);
return NextResponse.json({ error: "Internal server error" }, { status: 500 });