We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 485d0a5 commit b8cd47dCopy full SHA for b8cd47d
models/Article.js
@@ -25,7 +25,7 @@ ArticleSchema.pre('validate', function(next){
25
});
26
27
ArticleSchema.methods.slugify = function() {
28
- this.slug = slug(this.title);
+ this.slug = slug(this.title) + '-' + (Math.random() * Math.pow(36, 6) | 0).toString(36);
29
};
30
31
ArticleSchema.methods.updateFavoriteCount = function() {
0 commit comments