flows: fix schema for flow executor

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-05-16 19:13:31 +02:00
parent 07dc648470
commit 589f806b7c
3 changed files with 16 additions and 2 deletions

View File

@ -161,7 +161,7 @@ class FlowExecutorView(APIView):
@extend_schema(
responses={200: Challenge()},
request=ChallengeResponse(),
request=OpenApiTypes.OBJECT,
parameters=[
OpenApiParameter(
name="query",

View File

@ -3198,6 +3198,20 @@ paths:
required: true
tags:
- flows
requestBody:
content:
application/json:
schema:
type: object
additionalProperties: {}
application/x-www-form-urlencoded:
schema:
type: object
additionalProperties: {}
multipart/form-data:
schema:
type: object
additionalProperties: {}
security:
- authentik: []
- cookieAuth: []

View File

@ -114,7 +114,7 @@ export class FlowExecutor extends LitElement implements StageHost {
this.loading = true;
return new FlowsApi(DEFAULT_CONFIG).flowsExecutorSolveRaw({
flowSlug: this.flowSlug,
data: formData || {},
requestBody: formData || {},
query: window.location.search.substring(1),
}).then((challengeRaw) => {
return challengeRaw.raw.json();