Skip to content

Node.js based forum software built for the modern web

Adding the ability to use a different url

Сергей Савельев3831cd0e711d
diff --git a/src/categories/create.js b/src/categories/create.js
index b522f0750f..62f9d28266 100644
--- a/src/categories/create.js
+++ b/src/categories/create.js
@@ -13,7 +13,7 @@ module.exports = function(Categories) {
return callback(err);
}
- var slug = cid + '/' + utils.slugify(data.name),
+ var slug = data.slug ? cid + '/' + data.slug : cid + '/' + utils.slugify(data.name),
order = data.order || cid; // If no order provided, place it at the end
var category = {