This commit is contained in:
seb
2026-07-31 15:36:48 +02:00
parent 818d799f63
commit 6cc6dbb9e8
13 changed files with 1096 additions and 998 deletions

View File

@@ -98,6 +98,7 @@ const MENU = {
{ value: 'category.createUnderParent', label: 'createUnderParent', hint: 'googleAuthId, parentId, name → row' },
{ value: 'category.delete', label: 'delete', hint: 'googleAuthId, id' },
{ value: 'category.getTreeForCompany', label: 'getTreeForCompany', hint: 'googleAuthId, companyId → rows' },
{ value: 'category.getCategoryArticles', label: 'getCategoryArticles', hint: 'googleAuthId, categoryId → rows' },
],
},
companyuser: {
@@ -340,6 +341,19 @@ async function runMethod(client, action) {
await client.category.getTreeForCompany(Number(googleAuthId), Number(companyId)),
];
}
case 'category.getCategoryArticles': {
const googleAuthId = await askInt('google_auth id');
if (googleAuthId == null) return;
const categoryId = await askInt('category id');
if (categoryId == null) return;
return [
'rows',
await client.category.getCategoryArticles(
Number(googleAuthId),
Number(categoryId),
),
];
}
case 'companyuser.add': {
const companyId = await askInt('Company id');
if (companyId == null) return;