flow: pass Query on FlowExecutorSolve to prevent redirect issues
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
4d88af4601
commit
3698c6431c
|
@ -157,6 +157,15 @@ class FlowExecutorView(APIView):
|
||||||
@swagger_auto_schema(
|
@swagger_auto_schema(
|
||||||
responses={200: Challenge()},
|
responses={200: Challenge()},
|
||||||
request_body=ChallengeResponse(),
|
request_body=ChallengeResponse(),
|
||||||
|
manual_parameters=[
|
||||||
|
openapi.Parameter(
|
||||||
|
"query",
|
||||||
|
openapi.IN_QUERY,
|
||||||
|
required=True,
|
||||||
|
description="Querystring as received",
|
||||||
|
type=openapi.TYPE_STRING,
|
||||||
|
)
|
||||||
|
],
|
||||||
operation_id="flows_executor_solve",
|
operation_id="flows_executor_solve",
|
||||||
)
|
)
|
||||||
def post(self, request: HttpRequest, *args, **kwargs) -> HttpResponse:
|
def post(self, request: HttpRequest, *args, **kwargs) -> HttpResponse:
|
||||||
|
|
|
@ -2768,6 +2768,11 @@ paths:
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/ChallengeResponse'
|
$ref: '#/definitions/ChallengeResponse'
|
||||||
|
- name: query
|
||||||
|
in: query
|
||||||
|
description: Querystring as received
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: Challenge that gets sent to the client based on which stage
|
description: Challenge that gets sent to the client based on which stage
|
||||||
|
|
|
@ -108,6 +108,7 @@ export class FlowExecutor extends LitElement implements StageHost {
|
||||||
return new FlowsApi(DEFAULT_CONFIG).flowsExecutorSolveRaw({
|
return new FlowsApi(DEFAULT_CONFIG).flowsExecutorSolveRaw({
|
||||||
flowSlug: this.flowSlug,
|
flowSlug: this.flowSlug,
|
||||||
data: formData || {},
|
data: formData || {},
|
||||||
|
query: window.location.search.substring(1),
|
||||||
}).then((challengeRaw) => {
|
}).then((challengeRaw) => {
|
||||||
return challengeRaw.raw.json();
|
return challengeRaw.raw.json();
|
||||||
}).then((data) => {
|
}).then((data) => {
|
||||||
|
|
Reference in New Issue