New frontmatter'd docs with handler-compatible shapes:
- get_library_types.md (public; []LibraryTypes)
- list_libraries.md (admin; {data: ListLibrariesRow})
- get_library_folders.md (admin; []LibraryFolders)
- list/get stats/resolve/delete processing issues (admin; family-lens 403s
documented)
- scan_library.md (202 + 409 coalescing with active_job_id)
- get/update scan-settings (ScanSettingsResponse)
Gate improvements forced by this batch:
- Array responses: registered slice -> doc example must be a JSON array; key
set compared against the element type
- RawMessage pins may now be arrays
- update scan-settings uses a RawMessage pin: handler always sets Message but
the struct's omitempty would reject correct docs via zero-value marshal
Registry: sqlc models pinned directly (LibraryTypes, LibraryFolders,
ListLibrariesRow — json tags verified in the generated code).
33 lines
719 B
Markdown
33 lines
719 B
Markdown
---
|
|
method: GET
|
|
path: /api/libraries/:id/folders
|
|
auth: jwt+admin
|
|
area: libraries
|
|
---
|
|
<!-- source: internal/handlers/library.go:216 LibraryHandler.GetLibraryFolders -->
|
|
|
|
# Get Library Folders
|
|
|
|
Lists the filesystem folders configured for a library.
|
|
|
|
## Example response
|
|
|
|
```json example-response
|
|
[
|
|
{
|
|
"id": "aa0e8400-e29b-41d4-a716-446655440000",
|
|
"library_id": "990e8400-e29b-41d4-a716-446655440000",
|
|
"folder_path": "/books/manga",
|
|
"created_at": "2026-01-01T00:00:00Z"
|
|
}
|
|
]
|
|
```
|
|
|
|
## Errors
|
|
|
|
| Status | Body | When |
|
|
| ------ | ---- | ---- |
|
|
| 400 | `{"error": "invalid library id"}` | malformed id |
|
|
| 401 / 403 | — | missing JWT / not an admin |
|
|
| 500 | `{"error": "..."}` | unexpected server error |
|