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
commit743035279f96536dd9908758f72ec4cd2da61467 (patch)
tree5e649120d5acdc0efbad5241e453a76b98f13da6
parentMade nitro stuff make some sense (diff)
downloadserver-743035279f96536dd9908758f72ec4cd2da61467.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 })