u
This commit is contained in:
@@ -613,6 +613,19 @@
|
||||
* thumbHash:
|
||||
* type: string
|
||||
* nullable: true
|
||||
* smallThumbW:
|
||||
* type: integer
|
||||
* nullable: true
|
||||
* description: Width in pixels of the small AVIF thumbnail
|
||||
* smallThumbH:
|
||||
* type: integer
|
||||
* nullable: true
|
||||
* description: Height in pixels of the small AVIF thumbnail
|
||||
* smallThumbBinary:
|
||||
* type: string
|
||||
* format: byte
|
||||
* nullable: true
|
||||
* description: Base64-encoded small AVIF thumbnail bytes
|
||||
* brand:
|
||||
* $ref: '#/components/schemas/ArticleBrand'
|
||||
* nullable: true
|
||||
|
||||
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user