u
This commit is contained in:
@@ -177,6 +177,15 @@ export const article = {
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* DELETE /api/article/:sku → 204
|
||||
*/
|
||||
delete(sku) {
|
||||
return http(`/api/article/${encodeURIComponent(sku)}`, {
|
||||
method: 'DELETE',
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* POST /api/article/:sku/image
|
||||
* Body: raw AVIF bytes (Content-Type: image/avif, max 1000×1000, prepared client-side via WASM)
|
||||
@@ -189,6 +198,28 @@ export const article = {
|
||||
body: file,
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* DELETE /api/article/:sku/image/:fullHash → 204
|
||||
*/
|
||||
deleteImage(sku, fullHash) {
|
||||
return http(
|
||||
`/api/article/${encodeURIComponent(sku)}/image/${encodeURIComponent(fullHash)}`,
|
||||
{ method: 'DELETE' },
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
* PUT /api/article/:sku/images/order
|
||||
* Body: { fullHashes: string[] } (every image exactly once)
|
||||
* → 200 { fullHashes: string[] }
|
||||
*/
|
||||
orderImages(sku, fullHashes) {
|
||||
return http(`/api/article/${encodeURIComponent(sku)}/images/order`, {
|
||||
method: 'PUT',
|
||||
body: { fullHashes },
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user