feat: reorder inventory images atomically
Quality / test (push) Canceled after 0s

This commit is contained in:
2026-09-11 00:13:44 -04:00
parent 72e9a79b67
commit 0e81fc4022
15 changed files with 275 additions and 22 deletions
+10
View File
@@ -197,3 +197,13 @@ Seller contact removal uses the same explicit-empty-string convention:
whitespace-only strings clear the contact. Omitted contact fields retain their
saved values. `null` is not a settings input. Public listing/product detail DTOs
return `null` for empty or absent contacts, so no contact link is rendered.
`POST /api/v1/admin/images/:id/move` accepts exactly `{ "direction": "up" }`
or `{ "direction": "down" }`. Authentication and session CSRF validation are
required; ownership comes from the authenticated Seller. The server selects the
adjacent image within the same physical Inventory Item and commits all resulting
positions atomically. At the first/last position the corresponding move is a
successful no-op. Missing/unowned images return `404 IMAGE_NOT_FOUND`; invalid
bodies return `400 VALIDATION_ERROR`. The response uses the existing admin image
DTO. The legacy absolute `/order` endpoint remains available, but UI moves use
this new operation exclusively.