Add PUT /category/order to reorder sibling categories.
Wires up existing category.order store method (validates categoryIds are exactly the current children of parentId, sets each child sort to its index in one transaction) behind an authenticated HTTP route, plus @openapi docs and regenerated API docs.
This commit is contained in:
@@ -24,3 +24,8 @@ export async function rename({ googleAuthId, id, name }) {
|
||||
const store = await getStore();
|
||||
return store.category.rename({ googleAuthId, id, name });
|
||||
}
|
||||
|
||||
export async function order({ googleAuthId, parentId, categoryIds }) {
|
||||
const store = await getStore();
|
||||
return store.category.order({ googleAuthId, parentId, categoryIds });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user