Skip to content

Commit

Permalink
add versionNumber to 5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
vkarpov15 committed Apr 28, 2023
1 parent 1bc07ec commit 4b8b0a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ const contentSchema = new mongoose.Schema({
title: { type: String, required: true },
body: { type: String, required: true },
url: { type: String, required: true },
version: { type: String, required: true, default: version }
version: { type: String, required: true, default: version },
versionNumber: { type: Number, required: true, default: version.replace(/\.x$/, '') }
});
contentSchema.index({ title: 'text', body: 'text' });
const Content = mongoose.model('Content', contentSchema, 'Content');
Expand Down

0 comments on commit 4b8b0a9

Please sign in to comment.