From 1d8c89e72e3124b0b5abace11745a117ae0ddbef Mon Sep 17 00:00:00 2001 From: AnxietyisReal <96593068+AnxietyisReal@users.noreply.github.com> Date: Mon, 27 Feb 2023 18:14:54 +1100 Subject: [PATCH] Disable Mongoose's version keys. --- src/models/bannedWords.ts | 2 +- src/models/bonkCount.ts | 2 +- src/models/punishments.ts | 2 +- src/models/suggestion.ts | 2 +- src/models/userLevels.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/models/bannedWords.ts b/src/models/bannedWords.ts index b1cfb98..ea40529 100644 --- a/src/models/bannedWords.ts +++ b/src/models/bannedWords.ts @@ -3,7 +3,7 @@ import mongoose from 'mongoose'; const Schema = mongoose.model('bannedWords', new mongoose.Schema({ _id: {type: String, required:true} -})); +}, {versionKey: false})); export default class bannedWords extends Schema { client: TClient; diff --git a/src/models/bonkCount.ts b/src/models/bonkCount.ts index bb987b4..4040df2 100644 --- a/src/models/bonkCount.ts +++ b/src/models/bonkCount.ts @@ -4,7 +4,7 @@ import mongoose from 'mongoose'; const Schema = mongoose.model('bonkCount', new mongoose.Schema({ _id: {type: String, required:true}, value: {type: Number, required:true} -})); +}, {versionKey: false})); export default class bonkCount extends Schema { client: TClient; diff --git a/src/models/punishments.ts b/src/models/punishments.ts index 0147c35..e5b821b 100644 --- a/src/models/punishments.ts +++ b/src/models/punishments.ts @@ -15,7 +15,7 @@ const Schema = mongoose.model('punishments', new mongoose.Schema({ endTime: {type: Number}, cancels: {type: Number}, duration: {type: Number} -})); +}, {versionKey: false})); export default class punishments extends Schema { client: TClient; diff --git a/src/models/suggestion.ts b/src/models/suggestion.ts index 312f8a5..3898268 100644 --- a/src/models/suggestion.ts +++ b/src/models/suggestion.ts @@ -7,7 +7,7 @@ const Schema = mongoose.model('suggestion', new mongoose.Schema({ user: {required:true, type: new mongoose.Schema({ tag: {type: String}, _id: {type: String} - })}, + }, {versionKey: false})}, state: {type: String, required:true} }, {versionKey: false})); diff --git a/src/models/userLevels.ts b/src/models/userLevels.ts index 73318de..a4a61d9 100644 --- a/src/models/userLevels.ts +++ b/src/models/userLevels.ts @@ -6,7 +6,7 @@ const Schema = mongoose.model('userLevels', new mongoose.Schema({ _id: {type: String}, messages: {type: Number, required: true}, level: {type: Number, required: true} -})); +}, {versionKey: false})); export default class userLevels extends Schema { client: TClient;