summary refs log tree commit diff
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2022-08-13 20:45:51 +0200
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-12-18 23:58:17 +1100
commit5e4bbc2e832e3a34c7b711e2dc061cd68a48581a (patch)
treed4a7092853a6b75a5c569702d7f1b62fce886272
parentMade nitro stuff make some sense (diff)
downloadserver-5e4bbc2e832e3a34c7b711e2dc061cd68a48581a.tar.xz
Do the funny thing (make user->invite cascade delet)
-rw-r--r--src/util/entities/Invite.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util/entities/Invite.ts b/src/util/entities/Invite.ts
index ad4fd6db..8f5619fc 100644
--- a/src/util/entities/Invite.ts
+++ b/src/util/entities/Invite.ts
@@ -61,7 +61,9 @@ export class Invite extends BaseClassWithoutId {
 	inviter_id?: string;
 
 	@JoinColumn({ name: "inviter_id" })
-	@ManyToOne(() => User)
+	@ManyToOne(() => User, {
+		onDelete: "CASCADE"
+	})
 	inviter: User;
 
 	@Column({ nullable: true })