diff --git a/platform/src/EducationPlatformApp.js b/platform/src/EducationPlatformApp.js index 086ddc2..bb54df0 100644 --- a/platform/src/EducationPlatformApp.js +++ b/platform/src/EducationPlatformApp.js @@ -491,11 +491,7 @@ class EducationPlatformApp { const panelConfig = parameterMap.get(param.name); - if (panelConfig == undefined){ - // Set unused parameters in the request to undefined as the epsilon backend function expects them all. - actionRequestData[param.name] = "undefined"; - - } else { + if (panelConfig != undefined){ let parameterData = values.find(val => (val.name === param.name) ); actionRequestData[param.name] = parameterData.data; diff --git a/platform/test/spec/testEducationPlatformAppSpec.js b/platform/test/spec/testEducationPlatformAppSpec.js index 1e19c67..169e8d2 100644 --- a/platform/test/spec/testEducationPlatformAppSpec.js +++ b/platform/test/spec/testEducationPlatformAppSpec.js @@ -296,9 +296,7 @@ describe("EducationPlatformApp", () => { expect(platform.functionRegistry_call).toHaveBeenCalledWith(ACTION_FUNCTION_ID, EXPECTED_PARAM_VALUES); }) - it("sends request to a conversion function's url with unused parameters set to undefined", async () => { - /* This behaviour was to ensure compatibility with java google cloud function based - * Epsilon playground pre Micronaut that required all parameters to be provided. */ + it("sends requests to a conversion function's url without unused parameters", async () => { const PARAM1_TYPE = ACTION_FUNCTION_PARAM1_TYPE; const parameterMap = new Map ( @@ -323,7 +321,6 @@ describe("EducationPlatformApp", () => { // Check the expected results const EXPECTED_PARAM_VALUES = { [PARAM1_NAME]: PARAM1_VALUE, - [PARAM2_NAME]: "undefined", "language": TOOL_LANGUAGE }