summary refs log tree commit diff
path: root/dist/models/Message.js
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-04-06 22:06:53 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-04-06 22:06:53 +0200
commit7d9cc0efbf536bcf9bf596360bd8a12652d85b95 (patch)
treec94b9cb0f8ec402ad5f1ee80d9889d1e315155dd /dist/models/Message.js
parent:bug: fix Message Model (diff)
downloadserver-7d9cc0efbf536bcf9bf596360bd8a12652d85b95.tar.xz
:art: remove _id and __v from response
Diffstat (limited to 'dist/models/Message.js')
-rw-r--r--dist/models/Message.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/dist/models/Message.js b/dist/models/Message.js

index 18bb509d..dfa22d42 100644 --- a/dist/models/Message.js +++ b/dist/models/Message.js
@@ -117,6 +117,14 @@ exports.MessageSchema = new mongoose_1.Schema({ channel_id: String, guild_id: String, }, +}, { + toJSON: { + transform: function (doc, ret) { + delete ret.mention_channel_ids; + delete ret.mention_user_ids; + delete ret.mention_role_ids; + }, + }, }); exports.MessageSchema.virtual("author", { ref: User_1.UserModel,