Add POST /category/:id/move to relocate a category.
Wires up the existing category.move store method (validates source and target in the same company, rejects self/descendant cycles, assigns the next sibling sort) behind an authenticated HTTP route, plus @openapi docs and regenerated API docs.
This commit is contained in:
@@ -29,3 +29,8 @@ export async function order({ googleAuthId, parentId, categoryIds }) {
|
||||
const store = await getStore();
|
||||
return store.category.order({ googleAuthId, parentId, categoryIds });
|
||||
}
|
||||
|
||||
export async function move({ googleAuthId, id, parentId }) {
|
||||
const store = await getStore();
|
||||
return store.category.move({ googleAuthId, id, parentId });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user