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:
seb
2026-08-03 03:01:53 +02:00
parent a0f9a8a716
commit faefa3b9cf
6 changed files with 275 additions and 0 deletions

View File

@@ -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 });
}