diff options
Diffstat (limited to 'packages/merchant-backoffice-ui/src/paths/instance/webhooks')
-rw-r--r-- | packages/merchant-backoffice-ui/src/paths/instance/webhooks/list/index.tsx | 6 | ||||
-rw-r--r-- | packages/merchant-backoffice-ui/src/paths/instance/webhooks/update/index.tsx | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/packages/merchant-backoffice-ui/src/paths/instance/webhooks/list/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/webhooks/list/index.tsx index 7c24a7228..102aef96e 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/webhooks/list/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/webhooks/list/index.tsx @@ -39,6 +39,7 @@ import { useInstanceWebhooks } from "../../../../hooks/webhooks.js"; import { Notification } from "../../../../utils/types.js"; import { NotFoundPageOrAdminCreate } from "../../../notfound/index.js"; import { ListPage } from "./ListPage.js"; +import { LoginPage } from "../../../login/index.js"; interface Props { onCreate: () => void; @@ -61,8 +62,11 @@ export default function ListWebhooks({ onCreate, onSelect }: Props): VNode { case HttpStatusCode.NotFound: { return <NotFoundPageOrAdminCreate />; } + case HttpStatusCode.Unauthorized: { + return <LoginPage /> + } default: { - assertUnreachable(result.case); + assertUnreachable(result); } } } diff --git a/packages/merchant-backoffice-ui/src/paths/instance/webhooks/update/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/webhooks/update/index.tsx index 1c3172ffd..262e5bba4 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/webhooks/update/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/webhooks/update/index.tsx @@ -36,6 +36,7 @@ import { import { Notification } from "../../../../utils/types.js"; import { NotFoundPageOrAdminCreate } from "../../../notfound/index.js"; import { UpdatePage } from "./UpdatePage.js"; +import { LoginPage } from "../../../login/index.js"; export type Entity = TalerMerchantApi.WebhookPatchDetails & WithId; @@ -65,8 +66,11 @@ export default function UpdateWebhook({ case HttpStatusCode.NotFound: { return <NotFoundPageOrAdminCreate />; } + case HttpStatusCode.Unauthorized: { + return <LoginPage /> + } default: { - assertUnreachable(result.case); + assertUnreachable(result); } } } |