u
This commit is contained in:
@@ -327,11 +327,11 @@ export class ApiClient {
|
||||
delete: (id) => this.#empty('DELETE', `/api/category/${enc(id)}`),
|
||||
/** PUT /api/category/order */
|
||||
order: (body) => this.#json('PUT', '/api/category/order', { body }),
|
||||
/** POST /api/category/{id}/image — raw AVIF body */
|
||||
addImage: (id, avifBytes) =>
|
||||
/** POST /api/category/{id}/image — raw image body */
|
||||
addImage: (id, imageBytes) =>
|
||||
this.#json('POST', `/api/category/${enc(id)}/image`, {
|
||||
body: avifBytes,
|
||||
contentType: 'image/avif',
|
||||
body: imageBytes,
|
||||
contentType: imageBytes?.type || 'image/webp',
|
||||
raw: true,
|
||||
}),
|
||||
/** DELETE /api/category/{id}/image */
|
||||
@@ -380,11 +380,11 @@ export class ApiClient {
|
||||
delete: (sku) => this.#empty('DELETE', `/api/article/${enc(sku)}`),
|
||||
/** PUT /api/article/{sku}/prices */
|
||||
setPrices: (sku, body) => this.#json('PUT', `/api/article/${enc(sku)}/prices`, { body }),
|
||||
/** POST /api/article/{sku}/image — raw AVIF body */
|
||||
addImage: (sku, avifBytes) =>
|
||||
/** POST /api/article/{sku}/image — raw image body */
|
||||
addImage: (sku, imageBytes) =>
|
||||
this.#json('POST', `/api/article/${enc(sku)}/image`, {
|
||||
body: avifBytes,
|
||||
contentType: 'image/avif',
|
||||
body: imageBytes,
|
||||
contentType: imageBytes?.type || 'image/webp',
|
||||
raw: true,
|
||||
}),
|
||||
/** DELETE /api/article/{sku}/image/{fullHash} */
|
||||
|
||||
Reference in New Issue
Block a user