From 9846a2be41c3795e8ed94d0ecfa4add493eb1c9a Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 9 Oct 2023 22:36:46 +0200 Subject: [PATCH] fix lint errors Signed-off-by: Jens Langhammer --- .../ak-application-wizard-commit-application.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/web/src/admin/applications/wizard/commit/ak-application-wizard-commit-application.ts b/web/src/admin/applications/wizard/commit/ak-application-wizard-commit-application.ts index 906856344..eaea1dfd3 100644 --- a/web/src/admin/applications/wizard/commit/ak-application-wizard-commit-application.ts +++ b/web/src/admin/applications/wizard/commit/ak-application-wizard-commit-application.ts @@ -24,7 +24,7 @@ import { TransactionApplicationRequest, TransactionApplicationResponse, } from "@goauthentik/api"; -import type { ModelRequest } from "@goauthentik/api"; +import type { ModelRequest, ResponseError } from "@goauthentik/api"; import BasePanel from "../BasePanel"; import providerModelsList from "../auth-method-choice/ak-application-wizard-authentication-method-choice.choices"; @@ -68,8 +68,8 @@ const successState: State = { icon: ["fa-check-circle", "pf-m-success"], }; -function extract(o: Record): string[] { - function inner(o: Record): string[] { +function extract(o: Record): string[] { + function inner(o: Record): string[] { if (typeof o !== "object") { return []; } @@ -77,7 +77,7 @@ function extract(o: Record): string[] { return o; } return Object.keys(o) - .map((k) => inner(o[k])) + .map((k) => inner(o[k] as Record)) .flat(); } return inner(o); @@ -168,8 +168,8 @@ export class ApplicationWizardCommitApplication extends BasePanel { this.dispatchWizardUpdate({ status: "submitted" }); this.commitState = successState; }) - .catch((resolution: any) => { - resolution.response.json().then((body: Record) => { + .catch((resolution: ResponseError) => { + resolution.response.json().then((body: Record) => { this.errors = extract(body); this.commitState = errorState; });