fix lint errors
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
parent
5a33e7e4d7
commit
9846a2be41
|
@ -24,7 +24,7 @@ import {
|
||||||
TransactionApplicationRequest,
|
TransactionApplicationRequest,
|
||||||
TransactionApplicationResponse,
|
TransactionApplicationResponse,
|
||||||
} from "@goauthentik/api";
|
} from "@goauthentik/api";
|
||||||
import type { ModelRequest } from "@goauthentik/api";
|
import type { ModelRequest, ResponseError } from "@goauthentik/api";
|
||||||
|
|
||||||
import BasePanel from "../BasePanel";
|
import BasePanel from "../BasePanel";
|
||||||
import providerModelsList from "../auth-method-choice/ak-application-wizard-authentication-method-choice.choices";
|
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"],
|
icon: ["fa-check-circle", "pf-m-success"],
|
||||||
};
|
};
|
||||||
|
|
||||||
function extract(o: Record<string, any>): string[] {
|
function extract(o: Record<string, unknown>): string[] {
|
||||||
function inner(o: Record<string, any>): string[] {
|
function inner(o: Record<string, unknown>): string[] {
|
||||||
if (typeof o !== "object") {
|
if (typeof o !== "object") {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,7 @@ function extract(o: Record<string, any>): string[] {
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
return Object.keys(o)
|
return Object.keys(o)
|
||||||
.map((k) => inner(o[k]))
|
.map((k) => inner(o[k] as Record<string, unknown>))
|
||||||
.flat();
|
.flat();
|
||||||
}
|
}
|
||||||
return inner(o);
|
return inner(o);
|
||||||
|
@ -168,8 +168,8 @@ export class ApplicationWizardCommitApplication extends BasePanel {
|
||||||
this.dispatchWizardUpdate({ status: "submitted" });
|
this.dispatchWizardUpdate({ status: "submitted" });
|
||||||
this.commitState = successState;
|
this.commitState = successState;
|
||||||
})
|
})
|
||||||
.catch((resolution: any) => {
|
.catch((resolution: ResponseError) => {
|
||||||
resolution.response.json().then((body: Record<string, any>) => {
|
resolution.response.json().then((body: Record<string, unknown>) => {
|
||||||
this.errors = extract(body);
|
this.errors = extract(body);
|
||||||
this.commitState = errorState;
|
this.commitState = errorState;
|
||||||
});
|
});
|
||||||
|
|
Reference in a new issue