summary refs log tree commit diff
diff options
context:
space:
mode:
authorFeatyre <88265031+Featyre@users.noreply.github.com>2022-02-01 16:54:50 +0000
committerGitHub <noreply@github.com>2022-02-01 16:54:50 +0000
commit862c80b3433d9cbdf1a0192b9a069a2d6661bcd4 (patch)
tree01d7a92d7b58441be9fbbc21b53d2fd3d7ac6fed
parentA few minor changes (diff)
parentMerge pull request #612 from ImAaronFR/patch-3 (diff)
downloadserver-862c80b3433d9cbdf1a0192b9a069a2d6661bcd4.tar.xz
Merge branch 'fosscord:master' into master
-rw-r--r--api/client_test/index.html10
-rw-r--r--util/src/entities/Message.ts6
2 files changed, 9 insertions, 7 deletions
diff --git a/api/client_test/index.html b/api/client_test/index.html
index 0b3a775a..384c598a 100644
--- a/api/client_test/index.html
+++ b/api/client_test/index.html
@@ -65,11 +65,11 @@
 				localStorage.setItem("UserSettingsStore", JSON.stringify(settings));
 			}
 		</script>
-		<script src="/assets/checkLocale.js"></script>
-		<script src="/assets/479a2f1e7d625dc134b9.js"></script>
-		<script src="/assets/a15fd133a1d2d77a2424.js"></script>
-		<script src="/assets/97e6fa22aa08ee4daa5e.js"></script>
-		<script src="/assets/9b2b7f0632acd0c5e781.js"></script>
+	 	<script src="/assets/checkLocale.js"></script>
+		<script src="/assets/1e18f2aac02e172db283.js"></script>
+		<script src="/assets/681e53cdfefa5b82249a.js"></script>
+		<script src="/assets/7a036838c0a0e73f59d8.js"></script>
+		<script src="/assets/b6cf2184a7a05e7525ce.js"></script>
 		<!-- plugin marker -->
 	</body>
 </html>
diff --git a/util/src/entities/Message.ts b/util/src/entities/Message.ts
index 20a44ca3..e577d5df 100644
--- a/util/src/entities/Message.ts
+++ b/util/src/entities/Message.ts
@@ -84,8 +84,10 @@ export class Message extends BaseClass {
 	@RelationId((message: Message) => message.member)
 	member_id: string;
 
-	@JoinColumn({ name: "member_id" })
-	@ManyToOne(() => Member)
+	@JoinColumn({ name: "author_id", referencedColumnName: "id" })
+	@ManyToOne(() => User, {
+		onDelete: "CASCADE",
+	})
 	member?: Member;
 
 	@Column({ nullable: true })