u
This commit is contained in:
@@ -109,6 +109,11 @@ const MENU = {
|
||||
label: 'createUnderParent',
|
||||
hint: 'googleAuthId, parentId, name → row',
|
||||
},
|
||||
{
|
||||
value: 'article.getBySku',
|
||||
label: 'getBySku',
|
||||
hint: 'googleAuthId, sku → row',
|
||||
},
|
||||
],
|
||||
},
|
||||
companyuser: {
|
||||
@@ -382,6 +387,18 @@ async function runMethod(client, action) {
|
||||
}),
|
||||
];
|
||||
}
|
||||
case 'article.getBySku': {
|
||||
const googleAuthId = await askInt('google_auth id');
|
||||
if (googleAuthId == null) return;
|
||||
const sku = await askText('sku', {
|
||||
validate: (v) => (!v?.trim() ? 'Required' : undefined),
|
||||
});
|
||||
if (sku == null) return;
|
||||
return [
|
||||
'result',
|
||||
await client.article.getBySku(Number(googleAuthId), sku),
|
||||
];
|
||||
}
|
||||
case 'companyuser.add': {
|
||||
const companyId = await askInt('Company id');
|
||||
if (companyId == null) return;
|
||||
|
||||
Reference in New Issue
Block a user