We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 561cfc5 commit 464db62Copy full SHA for 464db62
1 file changed
apps/backend/src/routes/event.ts
@@ -221,6 +221,9 @@ export async function eventRoutes(app:FastifyInstance) {
221
slug: paramsSlug
222
},
223
include: {
224
+ _count: {
225
+ select: { attendees: true }
226
+ },
227
attendees : {
228
229
user: {
@@ -264,7 +267,7 @@ export async function eventRoutes(app:FastifyInstance) {
264
267
pagination: {
265
268
page,
266
269
limit,
- total : event.attendees.length,
270
+ total : event._count.attendees,
271
}
272
273
0 commit comments