Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions backend/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4253,10 +4253,14 @@ All errors return JSON with an \`error\` field and optional \`code\`:
const profile = await prisma.profile.findUnique({
where: { username },
include: {
supportTransactions: { select: { id: true } },
recurringSupports: { select: { id: true } },
milestones: { select: { id: true } },
webhooks: { select: { id: true } },
_count: {
select: {
supportTransactions: true,
recurringSupports: true,
milestones: true,
webhooks: true,
},
},
},
}) as any;

Expand All @@ -4274,10 +4278,10 @@ All errors return JSON with an \`error\` field and optional \`code\`:
profileId: profile.id,
userId: user.id,
relatedRecords: {
transactions: profile.supportTransactions.length,
recurring: profile.recurringSupports.length,
milestones: profile.milestones.length,
webhooks: profile.webhooks.length,
transactions: profile._count.supportTransactions,
recurring: profile._count.recurringSupports,
milestones: profile._count.milestones,
webhooks: profile._count.webhooks,
},
}, "Profile deletion initiated");

Expand Down
Loading