mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-07 21:21:49 +02:00
🐛 Delete all comments when deleting account (#1267)
Signed-off-by: Luke Vella <me@lukevella.com>
This commit is contained in:
parent
550eebdd9a
commit
8d308ef8b3
1 changed files with 1 additions and 1 deletions
|
@ -64,7 +64,7 @@ export const user = router({
|
||||||
where: { userId: ctx.user.id },
|
where: { userId: ctx.user.id },
|
||||||
});
|
});
|
||||||
await tx.comment.deleteMany({
|
await tx.comment.deleteMany({
|
||||||
where: { userId: ctx.user.id },
|
where: { OR: [{ pollId: { in: pollIds } }, { userId: ctx.user.id }] },
|
||||||
});
|
});
|
||||||
await tx.poll.deleteMany({
|
await tx.poll.deleteMany({
|
||||||
where: { userId: ctx.user.id },
|
where: { userId: ctx.user.id },
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue