1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-11 13:14:06 +01:00

🐛 fix Message Model

This commit is contained in:
Flam3rboy 2021-04-06 20:24:58 +02:00
parent 3205dc6f60
commit 41e7268947
6 changed files with 10 additions and 12 deletions

View File

@ -134,19 +134,19 @@ exports.MessageSchema.virtual("mentions", {
ref: User_1.UserModel,
localField: "mention_user_ids",
foreignField: "id",
justOne: true,
justOne: false,
});
exports.MessageSchema.virtual("mention_roles", {
ref: Role_1.RoleModel,
localField: "mention_role_ids",
foreignField: "id",
justOne: true,
justOne: false,
});
exports.MessageSchema.virtual("mention_channels", {
ref: Role_1.RoleModel,
localField: "mention_role_ids",
localField: "mention_channel_ids",
foreignField: "id",
justOne: true,
justOne: false,
});
// TODO: missing Application Model
// MessageSchema.virtual("application", {

View File

@ -1 +1 @@
{"version":3,"file":"Message.js","sourceRoot":"","sources":["../../src/models/Message.ts"],"names":[],"mappings":";;;;;;AAAA,uCAAmD;AACnD,gEAAkC;AAClC,iCAAmC;AACnC,qCAAuC;AACvC,iCAAmC;AAwCnC,IAAY,WAkBX;AAlBD,WAAY,WAAW;IACtB,mDAAW,CAAA;IACX,+DAAiB,CAAA;IACjB,qEAAoB,CAAA;IACpB,6CAAQ,CAAA;IACR,2EAAuB,CAAA;IACvB,2EAAuB,CAAA;IACvB,iFAA0B,CAAA;IAC1B,uEAAqB,CAAA;IACrB,mGAAmC,CAAA;IACnC,iHAA0C,CAAA;IAC1C,kHAA2C,CAAA;IAC3C,kHAA2C,CAAA;IAC3C,0EAAuB,CAAA;IACvB,8FAAiC,CAAA;IACjC,4FAAgC,CAAA;IAChC,gDAAU,CAAA;IACV,4EAAwB,CAAA;AACzB,CAAC,EAlBW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAkBtB;AAsEY,QAAA,UAAU,GAAG;IACzB,EAAE,EAAE,MAAM;IACV,QAAQ,EAAE,MAAM;IAChB,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,MAAM;IACX,SAAS,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AC;AAEH,qBAAa,CAAC,OAAO,CAAC,kBAAkB,EAAE;IACzC,GAAG,EAAE,gBAAS;IACd,UAAU,EAAE,qBAAqB;IACjC,YAAY,EAAE,IAAI;IAClB,OAAO,EAAE,KAAK;CACd,CAAC,CAAC;AAEH,kCAAkC;AAClC,yCAAyC;AACzC,qBAAqB;AACrB,mCAAmC;AACnC,uBAAuB;AACvB,kBAAkB;AAClB,MAAM;AAEN,aAAa;AACA,QAAA,YAAY,GAAG,kBAAE,CAAC,KAAK,CAAkB,SAAS,EAAE,qBAAa,EAAE,UAAU,CAAC,CAAC"}

1
dist/models/User.js vendored
View File

@ -17,7 +17,6 @@ exports.UserSchema = new mongoose_1.Schema({
desktop: Boolean,
mobile: Boolean,
premium: Boolean,
date_of_birth: Date,
premium_type: Number,
bot: Boolean,
system: Boolean,

View File

@ -1 +1 @@
{"version":3,"file":"User.js","sourceRoot":"","sources":["../../src/models/User.ts"],"names":[],"mappings":";;;;;;AAAA,yCAAsC;AACtC,qCAAgD;AAChD,uCAAmD;AACnD,gEAAkC;AAoHrB,QAAA,UAAU,GAAG,IAAI,iBAAM,CAAC;IACpC,EAAE,EAAE,MAAM;IACV,QAAQ,EAAE,MAAM;IAChB,aAAa,EAAE,MAAM;IACrB,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,MAAM;IACb,OAAO,EAAE,OAAO;IAChB,MAAM,EAAE,OAAO;IACf,OAAO,EAAE,OAAO;IAChB,aAAa,EAAE,IAAI;IACnB,YAAY,EAAE,MAAM;IACpB,GAAG,EAAE,OAAO;IACZ,MAAM,EAAE,OAAO;IACf,YAAY,EAAE,OAAO;IACrB,WAAW,EAAE,OAAO;IACpB,UAAU,EAAE,IAAI;IAChB,QAAQ,EAAE,OAAO;IACjB,KAAK,EAAE,MAAM;IACb,KAAK,EAAE,gBAAK,CAAC,IAAI;IACjB,YAAY,EAAE,gBAAK,CAAC,IAAI;IACxB,MAAM,EAAE,CAAC,MAAM,CAAC;IAChB,SAAS,EAA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eAAe,EAAE,CAAC,MAAM,CAAC;QACzB,uBAAuB,EAAE,OAAO;QAChC,kBAAkB,EAAE,OAAO;QAC3B,MAAM,EAAE,MAAM;QACd,uBAAuB,EAAE,OAAO;QAChC,gCAAgC,EAAE,OAAO;QACzC,aAAa,EAAE,OAAO;QACtB,gBAAgB,EAAE,OAAO;QACzB,iBAAiB,EAAE,CAAC,MAAM,CAAC;QAC3B,iBAAiB,EAAE,OAAO;QAC1B,MAAM,EAAE,MAAM;QACd,4BAA4B,EAAE,OAAO;QACrC,KAAK,EAAE,MAAM;QACb,eAAe,EAAE,MAAM;KACvB;IAED,QAAQ,EAAE;QACT,MAAM,EAAE,MAAM;QACd,UAAU,EAAE,CAAC,mBAAQ,CAAC;QACtB,aAAa,EAAE,qBAAY;KAC3B;CACD,CAAC,CAAC;AAEH,aAAa;AACA,QAAA,SAAS,GAAG,kBAAE,CAAC,KAAK,CAAe,MAAM,EAAE,kBAAU,EAAE,OAAO,CAAC,CAAC"}

View File

@ -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

View File

@ -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,