54 lines
1.1 KiB
Markdown
54 lines
1.1 KiB
Markdown
# `DELETE /attributevalue/{id}/image`
|
|
|
|
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
|
|
|
Delete attribute value image
|
|
|
|
Removes the attribute value's image. Sets thumbW, thumbH, thumbHash back to null. Emits SSE signal `attributename`.
|
|
|
|
## Path parameters
|
|
|
|
| Param | Required | Type | Description |
|
|
|-------|----------|------|-------------|
|
|
| `id` | yes | integer | Attribute value id |
|
|
|
|
## Signals
|
|
|
|
On success, emits SSE signal: `attributename` (see [`GET /events`](../events.md)).
|
|
|
|
## Response `200`
|
|
|
|
Image removed
|
|
|
|
```json
|
|
{
|
|
"attributevalue": {
|
|
"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 | Attribute value or image not found — `{"error":"…"}` |
|
|
|
|
---
|
|
|
|
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._
|