Add articlehistory on updateBySku and getHistoryBySku
This commit is contained in:
@@ -183,6 +183,11 @@ const MENU = {
|
||||
label: 'getBySku',
|
||||
hint: 'googleAuthId, sku → row',
|
||||
},
|
||||
{
|
||||
value: 'article.getHistoryBySku',
|
||||
label: 'getHistoryBySku',
|
||||
hint: 'googleAuthId, sku → history[]',
|
||||
},
|
||||
{
|
||||
value: 'article.updateBySku',
|
||||
label: 'updateBySku',
|
||||
@@ -779,6 +784,18 @@ async function runMethod(client, action) {
|
||||
await client.article.getBySku(Number(googleAuthId), sku),
|
||||
];
|
||||
}
|
||||
case 'article.getHistoryBySku': {
|
||||
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.getHistoryBySku(Number(googleAuthId), sku),
|
||||
];
|
||||
}
|
||||
case 'article.updateBySku': {
|
||||
const googleAuthId = await askInt('google_auth id');
|
||||
if (googleAuthId == null) return;
|
||||
|
||||
Reference in New Issue
Block a user