0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 18:32:41 +00:00

Don't forget to update the schema!

This commit is contained in:
G.Ambatte
2024-04-22 00:26:34 +12:00
parent 14c7a11528
commit 874cbe1da4

View File

@@ -26,7 +26,9 @@ const HomebrewSchema = mongoose.Schema({
updatedAt : { type: Date, default: Date.now },
lastViewed : { type: Date, default: Date.now },
views : { type: Number, default: 0 },
version : { type: Number, default: 1 }
version : { type: Number, default: 1 },
lock : { type: Object }
}, { versionKey: false });
HomebrewSchema.statics.increaseView = async function(query) {