Reimplement Body Param File input filtering for saving requests

This commit is contained in:
Andrew Bastin
2021-05-31 14:00:23 -04:00
parent fea3843714
commit b52cc9e2b4

View File

@@ -175,6 +175,13 @@ export default {
name: this.$data.requestData.name,
}
// Filter out all REST file inputs
if (this.mode === "rest" && requestUpdated.bodyParams) {
requestUpdated.bodyParams = requestUpdated.bodyParams.map((param) =>
param?.value?.[0] instanceof File ? { ...param, value: "" } : param
)
}
if (this.picked.pickedType === "my-request") {
editRESTRequest(
this.picked.folderPath,