Skip to content

Commit

Permalink
[CIT-43] Bugfix, add user attending status (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
ishaan-upadhyay authored Jul 21, 2023
1 parent d2879bb commit ef8530d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion citrus/app/api/experiences/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,19 @@ export async function POST(request: Request) {
set: body.tags
},
org_id: body.org_id,
user_id: body.user_id
user_id: body.user_id,
attendees: body.attendees
}
});
for (var i = 0; i < body.attendees.length; i++) {
var attending_status = await prisma.user_attending_status.create({
data: {
username: body.attendees[i],
event_id: event.id,
attending: "interested"
}
});
}
return NextResponse.json(event);
} catch (e) {
return db.handleError(e);
Expand Down

1 comment on commit ef8530d

@vercel
Copy link

@vercel vercel bot commented on ef8530d Jul 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.