u
This commit is contained in:
@@ -135,6 +135,11 @@ const MENU = {
|
||||
label: 'orderImages',
|
||||
hint: 'googleAuthId, sku, comma fullHashes',
|
||||
},
|
||||
{
|
||||
value: 'article.delete',
|
||||
label: 'delete',
|
||||
hint: 'googleAuthId, sku',
|
||||
},
|
||||
],
|
||||
},
|
||||
pic: {
|
||||
@@ -508,10 +513,20 @@ async function runMethod(client, action) {
|
||||
}),
|
||||
];
|
||||
}
|
||||
case 'article.delete': {
|
||||
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;
|
||||
await client.article.delete(Number(googleAuthId), sku);
|
||||
return ['ok', true];
|
||||
}
|
||||
case 'pic.getImageByHash': {
|
||||
const googleAuthId = await askInt('google_auth id');
|
||||
if (googleAuthId == null) return;
|
||||
const fullHash = await askText('fullHash (SHA-256 hex)', {
|
||||
const fullHash = await askText('fullHash', {
|
||||
validate: (v) => (!v?.trim() ? 'Required' : undefined),
|
||||
});
|
||||
if (fullHash == null) return;
|
||||
@@ -533,7 +548,7 @@ async function runMethod(client, action) {
|
||||
case 'pic.getThumbByHash': {
|
||||
const googleAuthId = await askInt('google_auth id');
|
||||
if (googleAuthId == null) return;
|
||||
const fullHash = await askText('fullHash (SHA-256 hex)', {
|
||||
const fullHash = await askText('fullHash', {
|
||||
validate: (v) => (!v?.trim() ? 'Required' : undefined),
|
||||
});
|
||||
if (fullHash == null) return;
|
||||
|
||||
Reference in New Issue
Block a user