diff options
Diffstat (limited to 'packages/merchant-backoffice-ui/src/paths/instance/products')
3 files changed, 5 insertions, 5 deletions
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/products/create/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/products/create/index.tsx index 6cb083025..e1e3c846a 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/products/create/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/products/create/index.tsx @@ -45,7 +45,7 @@ export default function CreateProduct({ onConfirm, onBack }: Props): VNode { <CreatePage onBack={onBack} onCreate={(request: TalerMerchantApi.ProductAddDetail) => { - return lib.management.addProduct(state.token, request) + return lib.instance.addProduct(state.token, request) .then(() => onConfirm()) .catch((error) => { setNotif({ diff --git a/packages/merchant-backoffice-ui/src/paths/instance/products/list/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/products/list/index.tsx index 73c221662..dfd633150 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/products/list/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/products/list/index.tsx @@ -81,7 +81,7 @@ export default function ProductList({ <JumpToElementById testIfExist={async (id) => { - const resp = await lib.management.getProductDetails(state.token, id); + const resp = await lib.instance.getProductDetails(state.token, id); return resp.type === "ok"; }} onSelect={onSelect} @@ -94,7 +94,7 @@ export default function ProductList({ onCreate={onCreate} onUpdate={async (id, prod) => { try { - await lib.management.updateProduct(state.token, id, prod); + await lib.instance.updateProduct(state.token, id, prod); setNotif({ message: i18n.str`product updated successfully`, type: "SUCCESS", @@ -123,7 +123,7 @@ export default function ProductList({ onCancel={() => setDeleting(null)} onConfirm={async (): Promise<void> => { try { - await lib.management.deleteProduct(state.token, deleting.id); + await lib.instance.deleteProduct(state.token, deleting.id); setNotif({ message: i18n.str`Product "${deleting.description}" (ID: ${deleting.id}) has been deleted`, type: "SUCCESS", diff --git a/packages/merchant-backoffice-ui/src/paths/instance/products/update/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/products/update/index.tsx index 08b169610..06f813b14 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/products/update/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/products/update/index.tsx @@ -79,7 +79,7 @@ export default function UpdateProduct({ product={{ ...result.body, product_id: pid }} onBack={onBack} onUpdate={(data) => { - return lib.management.updateProduct(state.token, pid, data) + return lib.instance.updateProduct(state.token, pid, data) .then(onConfirm) .catch((error) => { setNotif({ |