Wire store-backed CRUD for goods receipts and suppliers, and teach the API doc generator to expand $ref/allOf/array samples so route markdown shows full JSON shapes.
995 B
995 B
PUT /category/order
Protected. Requires a valid session cookie (credentials: 'include').
Reorder sibling categories
Sets the sibling sort order of categoryIds under parentId.
categoryIds must be exactly the current child set of parentId
(same count, no foreign/duplicate ids). Each child's sort is set
to its index 0..n-1 in one transaction.
Body (JSON)
{
"parentId": 1,
"categoryIds": [
2,
4,
3,
5
]
}
Signals
On success, emits SSE signal: category (see GET /events).
Response 200
New sibling order
{
"categoryIds": [
1
]
}
Errors
| Status | Description |
|---|---|
| 400 | Invalid category order — {"error":"…"} |
| 401 | Unauthorized — {"error":"…"} |
| 403 | Not authorized — {"error":"…"} |
| 404 | Parent category not found — {"error":"…"} |
Generated from @openapi JSDoc. Do not edit by hand — run npm run docs:api.