u
This commit is contained in:
@@ -4,7 +4,7 @@ Protected. Requires a valid session cookie (`credentials: 'include'`).
|
|||||||
|
|
||||||
Articles in category
|
Articles in category
|
||||||
|
|
||||||
Returns articles in a category the user is authorized for (omits child articles of a parent article). Each article includes `childCount` (the number of its child articles).
|
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).
|
||||||
|
|
||||||
## Path parameters
|
## Path parameters
|
||||||
|
|
||||||
|
|||||||
@@ -304,7 +304,7 @@ export function register(app, basePath = '') {
|
|||||||
* get:
|
* get:
|
||||||
* tags: [Category]
|
* tags: [Category]
|
||||||
* summary: Articles in category
|
* summary: Articles in category
|
||||||
* description: Returns articles in a category the user is authorized for (omits child articles of a parent article). 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).
|
||||||
* security:
|
* security:
|
||||||
* - cookieAuth: []
|
* - cookieAuth: []
|
||||||
* x-markdown: category/articles.md
|
* x-markdown: category/articles.md
|
||||||
@@ -401,7 +401,8 @@ export function register(app, basePath = '') {
|
|||||||
...a,
|
...a,
|
||||||
childCount: Number(a.childCount ?? 0),
|
childCount: Number(a.childCount ?? 0),
|
||||||
isParent: Boolean(a.isParent ?? a.is_parent),
|
isParent: Boolean(a.isParent ?? a.is_parent),
|
||||||
}));
|
}))
|
||||||
|
.sort((a, b) => (a.name ?? '').localeCompare(b.name ?? '') || a.id - b.id);
|
||||||
res.status(200).json({ articles });
|
res.status(200).json({ articles });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
const status = categoryErrorStatus(error);
|
const status = categoryErrorStatus(error);
|
||||||
|
|||||||
@@ -848,9 +848,9 @@ export class ConversationManager {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const reasoningEffort = await resolveModelReasoning(googleAuthId);
|
const reasoningEffort = await resolveModelReasoning(googleAuthId);
|
||||||
const extraBody = reasoningEffort && reasoningEffort !== 'none'
|
const extraBody = reasoningEffort
|
||||||
? { reasoning: { effort: reasoningEffort } }
|
? { reasoning: { effort: reasoningEffort } }
|
||||||
: { reasoning: undefined };
|
: {};
|
||||||
|
|
||||||
const result = await this.orbiter.run({
|
const result = await this.orbiter.run({
|
||||||
messages,
|
messages,
|
||||||
|
|||||||
Reference in New Issue
Block a user