mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-17 03:01:08 +01:00
performance improvements
store parsed category description removed mongo _key from returns dont get category teaser for parent
This commit is contained in:
@@ -53,17 +53,11 @@ module.exports = function(Categories) {
|
||||
}
|
||||
|
||||
if (category.description) {
|
||||
plugins.fireHook('filter:parse.raw', category.description, function(err, parsedDescription) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
category.descriptionParsed = parsedDescription;
|
||||
category.description = validator.escape(category.description);
|
||||
callback(null, category);
|
||||
});
|
||||
} else {
|
||||
callback(null, category);
|
||||
category.description = validator.escape(category.description);
|
||||
category.descriptionParsed = category.descriptionParsed || category.description;
|
||||
}
|
||||
|
||||
callback(null, category);
|
||||
}
|
||||
|
||||
Categories.getCategoryField = function(cid, field, callback) {
|
||||
|
||||
Reference in New Issue
Block a user