This commit is contained in:
seb
2026-10-09 17:55:45 +02:00
parent de7afbcbe9
commit 848ca0aff5
13 changed files with 331 additions and 48 deletions

View File

@@ -4,7 +4,7 @@ Protected. Requires a valid session cookie (`credentials: 'include'`).
Delete brand image
Removes the brand's image. Sets thumbW, thumbH, thumbHash back to null.
Removes the brand's image. Sets thumbW, thumbH, thumbHash back to null. Emits SSE signal `brand` with payload `{ sender, brandId }`.
## Path parameters
@@ -12,6 +12,10 @@ Removes the brand's image. Sets thumbW, thumbH, thumbHash back to null.
|-------|----------|------|-------------|
| `id` | yes | integer | Brand id |
## Signals
On success, emits SSE signal: `brand` (see [`GET /events`](../events.md)).
## Response `200`
Image removed

View File

@@ -5,7 +5,8 @@ Protected. Requires a valid session cookie (`credentials: 'include'`).
Add or replace brand image
Uploads an image for the brand (AVIF, WebP, or octet-stream). Converted to AVIF full and thumbnail.
Replaces any existing image for this brand.
Replaces any existing image for this brand. Emits SSE signal `brand`
with payload `{ sender, brandId }`.
## Path parameters
@@ -22,6 +23,10 @@ Raw binary (`image/webp`).
Raw binary (`application/octet-stream`).
## Signals
On success, emits SSE signal: `brand` (see [`GET /events`](../events.md)).
## Response `201`
Image stored and linked