From 603efbd073a2a9aa56f801fe57d13f060821b05d Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 8 Feb 2023 17:39:39 -0300 Subject: use request api from web-util --- .../src/paths/instance/update/index.tsx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'packages/merchant-backoffice-ui/src/paths/instance/update') diff --git a/packages/merchant-backoffice-ui/src/paths/instance/update/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/update/index.tsx index 02beb36f2..912393c7c 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/update/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/update/index.tsx @@ -13,7 +13,11 @@ You should have received a copy of the GNU General Public License along with GNU Taler; see the file COPYING. If not, see */ -import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser"; +import { + HttpError, + HttpResponse, + useTranslationContext, +} from "@gnu-taler/web-util/lib/index.browser"; import { Fragment, h, VNode } from "preact"; import { useState } from "preact/hooks"; import { Loading } from "../../../components/exception/loading.js"; @@ -26,7 +30,6 @@ import { useManagedInstanceDetails, useManagementAPI, } from "../../../hooks/instance.js"; -import { HttpError, HttpResponse } from "../../../utils/request.js"; import { Notification } from "../../../utils/types.js"; import { UpdatePage } from "./UpdatePage.js"; @@ -36,8 +39,8 @@ export interface Props { onUnauthorized: () => VNode; onNotFound: () => VNode; - onLoadError: (e: HttpError) => VNode; - onUpdateError: (e: HttpError) => void; + onLoadError: (e: HttpError) => VNode; + onUpdateError: (e: HttpError) => void; } export default function Update(props: Props): VNode { @@ -63,7 +66,10 @@ function CommonUpdate( onUpdateError, onUnauthorized, }: Props, - result: HttpResponse, + result: HttpResponse< + MerchantBackend.Instances.QueryInstancesResponse, + MerchantBackend.ErrorDetail + >, updateInstance: any, clearToken: any, setNewToken: any, -- cgit v1.2.3