futher booking stuff
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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 });
|
||||
Reference in New Issue
Block a user