aboutsummaryrefslogtreecommitdiff
path: root/packages/merchant-backoffice-ui/src/paths/instance/update
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2023-02-08 17:39:39 -0300
committerSebastian <sebasjm@gmail.com>2023-02-08 17:39:39 -0300
commit603efbd073a2a9aa56f801fe57d13f060821b05d (patch)
tree9ca8367dbbe6e47b2a11ac67bbc2747298fcd255 /packages/merchant-backoffice-ui/src/paths/instance/update
parentbe01d1479cf650fe8eb0c8e567620abfa4544e1e (diff)
downloadwallet-core-603efbd073a2a9aa56f801fe57d13f060821b05d.tar.xz
use request api from web-util
Diffstat (limited to 'packages/merchant-backoffice-ui/src/paths/instance/update')
-rw-r--r--packages/merchant-backoffice-ui/src/paths/instance/update/index.tsx16
1 files changed, 11 insertions, 5 deletions
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 <http://www.gnu.org/licenses/>
*/
-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<MerchantBackend.ErrorDetail>) => VNode;
+ onUpdateError: (e: HttpError<MerchantBackend.ErrorDetail>) => void;
}
export default function Update(props: Props): VNode {
@@ -63,7 +66,10 @@ function CommonUpdate(
onUpdateError,
onUnauthorized,
}: Props,
- result: HttpResponse<MerchantBackend.Instances.QueryInstancesResponse>,
+ result: HttpResponse<
+ MerchantBackend.Instances.QueryInstancesResponse,
+ MerchantBackend.ErrorDetail
+ >,
updateInstance: any,
clearToken: any,
setNewToken: any,