mirror of
https://github.com/foss42/apidash.git
synced 2025-12-06 21:07:58 +08:00
UPDATED ENV SUBSTITUTION
This commit is contained in:
@@ -83,7 +83,7 @@ class _FormDataBodyState extends ConsumerState<FormDataWidget> {
|
|||||||
key: ValueKey("$selectedId-$index-form-row-$seed"),
|
key: ValueKey("$selectedId-$index-form-row-$seed"),
|
||||||
cells: <DataCell>[
|
cells: <DataCell>[
|
||||||
DataCell(
|
DataCell(
|
||||||
EnvCellField(
|
CellField(
|
||||||
keyId: "$selectedId-$index-form-k-$seed",
|
keyId: "$selectedId-$index-form-k-$seed",
|
||||||
initialValue: formRows[index].name,
|
initialValue: formRows[index].name,
|
||||||
hintText: kHintAddFieldName,
|
hintText: kHintAddFieldName,
|
||||||
|
|||||||
@@ -85,6 +85,13 @@ HttpRequestModel substituteHttpRequestModel(
|
|||||||
value: substituteVariables(param.value, envMap, activeEnvironmentId),
|
value: substituteVariables(param.value, envMap, activeEnvironmentId),
|
||||||
);
|
);
|
||||||
}).toList(),
|
}).toList(),
|
||||||
|
formData: httpRequestModel.formData?.map((formData) {
|
||||||
|
return formData.copyWith(
|
||||||
|
name:
|
||||||
|
substituteVariables(formData.name, envMap, activeEnvironmentId) ?? "",
|
||||||
|
value: substituteVariables(formData.value, envMap, activeEnvironmentId) ?? "",
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
body: substituteVariables(
|
body: substituteVariables(
|
||||||
httpRequestModel.body,
|
httpRequestModel.body,
|
||||||
envMap,
|
envMap,
|
||||||
|
|||||||
Reference in New Issue
Block a user