summary refs log tree commit diff
path: root/src/models
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-04-06 20:24:58 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-04-06 20:24:58 +0200
commit41e72689476c639aa686074c9bb22d1cb04a6fc4 (patch)
tree72440761a03a47cd74808f5e12851b1863cb2ae3 /src/models
parentremove date_of_birth as discord only saves if someone is older than 18 years ... (diff)
downloadserver-41e72689476c639aa686074c9bb22d1cb04a6fc4.tar.xz
:bug: fix Message Model
Diffstat (limited to 'src/models')
-rw-r--r--src/models/Message.ts8
-rw-r--r--src/models/User.ts1
2 files changed, 4 insertions, 5 deletions
diff --git a/src/models/Message.ts b/src/models/Message.ts
index 4adf8024..bb3c2d5b 100644
--- a/src/models/Message.ts
+++ b/src/models/Message.ts
@@ -242,21 +242,21 @@ MessageSchema.virtual("mentions", {
 	ref: UserModel,
 	localField: "mention_user_ids",
 	foreignField: "id",
-	justOne: true,
+	justOne: false,
 });
 
 MessageSchema.virtual("mention_roles", {
 	ref: RoleModel,
 	localField: "mention_role_ids",
 	foreignField: "id",
-	justOne: true,
+	justOne: false,
 });
 
 MessageSchema.virtual("mention_channels", {
 	ref: RoleModel,
-	localField: "mention_role_ids",
+	localField: "mention_channel_ids",
 	foreignField: "id",
-	justOne: true,
+	justOne: false,
 });
 
 // TODO: missing Application Model
diff --git a/src/models/User.ts b/src/models/User.ts
index 1ea55f6a..76251e09 100644
--- a/src/models/User.ts
+++ b/src/models/User.ts
@@ -126,7 +126,6 @@ export const UserSchema = new Schema({
 	desktop: Boolean,
 	mobile: Boolean,
 	premium: Boolean,
-	date_of_birth: Date,
 	premium_type: Number,
 	bot: Boolean,
 	system: Boolean,