upgrade pnpm, Table auf Event seite
This commit is contained in:
@@ -11,6 +11,7 @@ export default async function Page({
|
||||
params: Promise<{ id: string; participantId: string }>;
|
||||
}) {
|
||||
const { id: eventId, participantId } = await params;
|
||||
console.log(eventId, participantId);
|
||||
|
||||
const event = await prisma.event.findUnique({
|
||||
where: { id: parseInt(eventId) },
|
||||
@@ -20,11 +21,15 @@ export default async function Page({
|
||||
where: { id: parseInt(participantId) },
|
||||
});
|
||||
|
||||
if (!participant) {
|
||||
return <Error title="Teilnehmer nicht gefunden" statusCode={404} />;
|
||||
}
|
||||
|
||||
const user = await prisma.user.findUnique({
|
||||
where: { id: participant?.userId },
|
||||
});
|
||||
|
||||
if (!event) return <div>Event nicht gefunden</div>;
|
||||
if (!event) return <Error title="Event nicht gefunden" statusCode={404} />;
|
||||
|
||||
if (!participant || !user) {
|
||||
return <Error title="Teilnehmer nicht gefunden" statusCode={404} />;
|
||||
|
||||
Reference in New Issue
Block a user