Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

🐛 Delete all comments when deleting account (#1267)

Luke Vella8d308ef8b353
diff --git a/packages/backend/trpc/routers/user.ts b/packages/backend/trpc/routers/user.ts
index 88070b51c..cf5c5b870 100644
--- a/packages/backend/trpc/routers/user.ts
+++ b/packages/backend/trpc/routers/user.ts
@@ -64,7 +64,7 @@ export const user = router({
where: { userId: ctx.user.id },
});
await tx.comment.deleteMany({
- where: { userId: ctx.user.id },
+ where: { OR: [{ pollId: { in: pollIds } }, { userId: ctx.user.id }] },
});
await tx.poll.deleteMany({
where: { userId: ctx.user.id },