summary refs log tree commit diff
path: root/src/util/entities/Application.ts
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-01-17 00:01:14 +1100
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-01-17 00:01:14 +1100
commit0af3da6db7d339e6e2a0181ffe8b8b9a8f809f8d (patch)
tree06a9b419e2781d52723038ff7499a7f61f941e9f /src/util/entities/Application.ts
parentReturn embed proxy url even if imagor not set up. Also make warning nicer (diff)
downloadserver-0af3da6db7d339e6e2a0181ffe8b8b9a8f809f8d.tar.xz
Fix deleting an application if it has a bot
Diffstat (limited to 'src/util/entities/Application.ts')
-rw-r--r--src/util/entities/Application.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/entities/Application.ts b/src/util/entities/Application.ts

index e37f5ee5..081b5cf4 100644 --- a/src/util/entities/Application.ts +++ b/src/util/entities/Application.ts
@@ -41,7 +41,7 @@ export class Application extends BaseClass { verify_key: string; @JoinColumn({ name: "owner_id" }) - @ManyToOne(() => User) + @ManyToOne(() => User, { onDelete: "CASCADE" }) owner: User; // TODO: enum this? https://discord.com/developers/docs/resources/application#application-object-application-flags @@ -76,7 +76,7 @@ export class Application extends BaseClass { discovery_eligibility_flags: number = 2240; @JoinColumn({ name: "bot_user_id" }) - @OneToOne(() => User) + @OneToOne(() => User, { onDelete: "CASCADE" }) bot?: User; @Column({ type: "simple-array", nullable: true })