Add category.move to reparent a category.
Validates both source and target via resolveCategoryAccess so the new parent must be a category of the same authorized company, and guards against moving into a descendant (cycle). Assigns next sibling sort.
This commit is contained in:
@@ -9,6 +9,7 @@ import categoryGetTreeForCompany from './store/category/getTreeForCompany.js';
|
||||
import categoryGetCategoryArticles from './store/category/getCategoryArticles.js';
|
||||
import categoryCreateUnderParent from './store/category/createUnderParent.js';
|
||||
import categoryRename from './store/category/rename.js';
|
||||
import categoryMove from './store/category/move.js';
|
||||
import categoryOrder from './store/category/order.js';
|
||||
import categoryDelete from './store/category/delete.js';
|
||||
import articleDelete from './store/article/delete.js';
|
||||
@@ -74,6 +75,7 @@ export default class LibDashStore {
|
||||
getCategoryArticles: categoryGetCategoryArticles(pool),
|
||||
createUnderParent: categoryCreateUnderParent(pool),
|
||||
rename: categoryRename(pool),
|
||||
move: categoryMove(pool),
|
||||
order: categoryOrder(pool),
|
||||
delete: categoryDelete(pool),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user