Skip to content

Commit

Permalink
Merge pull request #52 from nditc/rafsan
Browse files Browse the repository at this point in the history
up
  • Loading branch information
RafsanAmin authored Oct 12, 2024
2 parents 0f63593 + 1fff720 commit b2e3948
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/api/getevents/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ export async function POST(req: NextRequest) {
imageURL: e.data().imageURL,
description: e.data().description,
category: e.data().category,
participated: userParticipated.includes(e.id),
participated:
userParticipated && Array.isArray(userParticipated)
? userParticipated.includes(e.id)
: false,
}));

return NextResponse.json({
Expand Down

0 comments on commit b2e3948

Please sign in to comment.