From 09cd8f8f63749b1801baa3f25b876fbb259beb70 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 13 Jun 2021 22:40:51 +0200 Subject: [PATCH] web/admin: fix ak-application-check-access-form for get api Signed-off-by: Jens Langhammer --- .../applications/ApplicationCheckAccessForm.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/web/src/pages/applications/ApplicationCheckAccessForm.ts b/web/src/pages/applications/ApplicationCheckAccessForm.ts index 145d6c43b..dbe330791 100644 --- a/web/src/pages/applications/ApplicationCheckAccessForm.ts +++ b/web/src/pages/applications/ApplicationCheckAccessForm.ts @@ -1,4 +1,4 @@ -import { Application, CoreApi, CheckAccessRequestRequest, PolicyTestResult } from "authentik-api"; +import { Application, CoreApi, PolicyTestResult } from "authentik-api"; import { t } from "@lingui/macro"; import { customElement, property } from "lit-element"; import { html, TemplateResult } from "lit-html"; @@ -8,7 +8,7 @@ import { until } from "lit-html/directives/until"; import "../../elements/forms/HorizontalFormElement"; @customElement("ak-application-check-access-form") -export class ApplicationCheckAccessForm extends Form { +export class ApplicationCheckAccessForm extends Form { @property({attribute: false}) application!: Application; @@ -17,17 +17,17 @@ export class ApplicationCheckAccessForm extends Form result?: PolicyTestResult; @property({ attribute: false}) - request?: CheckAccessRequestRequest; + request?: number; getSuccessMessage(): string { return t`Successfully sent test-request.`; } - send = (data: CheckAccessRequestRequest): Promise => { + send = (data: number): Promise => { this.request = data; - return new CoreApi(DEFAULT_CONFIG).coreApplicationsCheckAccessCreate({ + return new CoreApi(DEFAULT_CONFIG).coreApplicationsCheckAccessRetrieve({ slug: this.application?.slug, - checkAccessRequestRequest: data, + forUser: data, }).then(result => this.result = result); }; @@ -68,7 +68,7 @@ export class ApplicationCheckAccessForm extends Form ordering: "username", }).then(users => { return users.results.map(user => { - return html``; + return html``; }); }), html``)}