This commit is contained in:
seb
2026-10-09 21:43:17 +02:00
parent ac10840fb6
commit d4e2b05cb0
6 changed files with 132 additions and 2 deletions

View File

@@ -0,0 +1,33 @@
# `GET /smallthumb/{fullHash}`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Small thumb image by hash
Returns the small thumb AVIF (40px max edge) for `pic.hash` (fullHash — not thumbhash).
Auth via article category access. Browser-cacheable (`private`, `immutable`, `ETag`).
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `fullHash` | yes | string | 8-char alphanumeric hash of the full image bytes |
## Response `200`
AVIF small thumb bytes
## Errors
| Status | Description |
|--------|-------------|
| 304 | Not modified (If-None-Match matched ETag) |
| 400 | Invalid hash — `{"error":"…"}` |
| 401 | Unauthorized — `{"error":"…"}` |
| 403 | Not authorized — `{"error":"…"}` |
| 404 | Image not found — `{"error":"…"}` |
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._