1.1 KiB
1.1 KiB
DELETE /brand/{id}/image
Protected. Requires a valid session cookie (credentials: 'include').
Delete brand image
Removes the brand's image. Sets thumbW, thumbH, thumbHash back to null. Emits SSE signal brand with payload { sender, brandId }.
Path parameters
| Param | Required | Type | Description |
|---|---|---|---|
id |
yes | integer | Brand id |
Signals
On success, emits SSE signal: brand (see GET /events).
Response 200
Image removed
{
"brand": {
"id": 1,
"thumbW": 1,
"thumbH": 1,
"thumbHash": "…",
"pics": [
{
"fullHash": "…",
"thumbW": 1,
"thumbH": 1,
"thumbHash": "…"
}
]
}
}
Errors
| Status | Description |
|---|---|
| 400 | No company selected or invalid id — {"error":"…"} |
| 401 | Unauthorized — {"error":"…"} |
| 403 | Not authorized — {"error":"…"} |
| 404 | Brand or image not found — {"error":"…"} |
Generated from @openapi JSDoc. Do not edit by hand — run npm run docs:api.