aboutsummaryrefslogtreecommitdiff
path: root/packages/demobank-ui/src/pages/LoginForm.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/demobank-ui/src/pages/LoginForm.tsx')
-rw-r--r--packages/demobank-ui/src/pages/LoginForm.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/demobank-ui/src/pages/LoginForm.tsx b/packages/demobank-ui/src/pages/LoginForm.tsx
index 627252682..7ec490c19 100644
--- a/packages/demobank-ui/src/pages/LoginForm.tsx
+++ b/packages/demobank-ui/src/pages/LoginForm.tsx
@@ -14,7 +14,7 @@
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
-import { TranslatedString } from "@gnu-taler/taler-util";
+import { HttpStatusCode, TranslatedString } from "@gnu-taler/taler-util";
import { LocalNotificationBanner, ShowInputErrorLabel, useLocalNotification, useTranslationContext } from "@gnu-taler/web-util/browser";
import { Fragment, VNode, h } from "preact";
import { useEffect, useRef, useState } from "preact/hooks";
@@ -76,13 +76,13 @@ export function LoginForm({ currentUser, fixedUser, onRegister }: { fixedUser?:
backend.logIn({ username, token: resp.body.access_token });
} else {
switch (resp.case) {
- case "wrong-credentials": return notify({
+ case HttpStatusCode.Unauthorized: return notify({
type: "error",
title: i18n.str`Wrong credentials for "${username}"`,
description: resp.detail.hint as TranslatedString,
debug: resp.detail,
})
- case "not-found": return notify({
+ case HttpStatusCode.NotFound: return notify({
type: "error",
title: i18n.str`Account not found`,
description: resp.detail.hint as TranslatedString,