This commit is contained in:
seb
2026-10-20 23:16:45 +02:00
parent fde381937c
commit 5a5981dc07
5 changed files with 23 additions and 4 deletions

View File

@@ -324,7 +324,7 @@ export function register(app, basePath = '') {
* get:
* tags: [Category]
* summary: Articles in category
* description: Returns articles in a category the user is authorized for (omits child articles of a parent article), sorted alphabetically by name. Each article includes `childCount` (the number of its child articles).
* description: Returns articles in a category the user is authorized for (omits child articles of a parent article), sorted alphabetically by name. Each article includes `childCount` (the number of its child articles) and small thumbnail fields (`smallThumbW`, `smallThumbH`, `smallThumbBinary`).
* security:
* - cookieAuth: []
* x-markdown: category/articles.md
@@ -382,6 +382,9 @@ export function register(app, basePath = '') {
...a,
childCount: Number(a.childCount ?? 0),
isParent: Boolean(a.isParent ?? a.is_parent),
smallThumbW: a.smallThumbW ?? null,
smallThumbH: a.smallThumbH ?? null,
smallThumbBinary: a.smallThumbBinary ?? null,
}))
.sort((a, b) => (a.name ?? '').localeCompare(b.name ?? '') || a.id - b.id);
res.status(200).json({ articles });