Have historyWatch report errors via notifyError instead of an onError callback.
This commit is contained in:
@@ -110,10 +110,9 @@ export class ApiClient {
|
||||
history: (sku) => this.#json('GET', `/api/article/${enc(sku)}/history`),
|
||||
/**
|
||||
* Load history and refetch on SSE `article-<sku>`.
|
||||
* `onHistory(history)` / `onError(err)` — returns unwatch().
|
||||
* `onHistory(history)` — returns unwatch(). Errors via notifyError.
|
||||
*/
|
||||
historyWatch: (sku, onHistory, onError) =>
|
||||
this.watchArticleHistory(sku, onHistory, onError),
|
||||
historyWatch: (sku, onHistory) => this.watchArticleHistory(sku, onHistory),
|
||||
/** PATCH /api/article/{sku} — body: at least one of { name, unitamount, unitSi } */
|
||||
update: async (sku, body) => {
|
||||
const nameChange = body != null && Object.hasOwn(body, 'name');
|
||||
|
||||
Reference in New Issue
Block a user