From 8d5010be660d6493bb7b7c5dbe37c76de6e89805 Mon Sep 17 00:00:00 2001 From: hongwei Date: Tue, 8 Nov 2022 10:58:36 +0100 Subject: [PATCH] refactor/trim all the spaces for the operation_id --- obp-api/src/main/scala/code/api/v4_0_0/APIMethods400.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/obp-api/src/main/scala/code/api/v4_0_0/APIMethods400.scala b/obp-api/src/main/scala/code/api/v4_0_0/APIMethods400.scala index 49d4c2e87..994b9c405 100644 --- a/obp-api/src/main/scala/code/api/v4_0_0/APIMethods400.scala +++ b/obp-api/src/main/scala/code/api/v4_0_0/APIMethods400.scala @@ -9212,7 +9212,7 @@ trait APIMethods400 { json.extract[PostApiCollectionEndpointJson400] } _ <- Helper.booleanToFuture(failMsg = s"$InvalidOperationId Current OPERATION_ID(${postJson.operation_id})", cc=Some(cc)) { - getAllResourceDocs.find(_.operationId==postJson.operation_id).isDefined + getAllResourceDocs.find(_.operationId==postJson.operation_id.trim).isDefined } (apiCollection, callContext) <- NewStyle.function.getApiCollectionByUserIdAndCollectionName(cc.userId, apiCollectionName, Some(cc)) apiCollectionEndpoint <- Future{MappedApiCollectionEndpointsProvider.getApiCollectionEndpointByApiCollectionIdAndOperationId(apiCollection.apiCollectionId, postJson.operation_id)} @@ -9261,7 +9261,7 @@ trait APIMethods400 { json.extract[PostApiCollectionEndpointJson400] } _ <- Helper.booleanToFuture(failMsg = s"$InvalidOperationId Current OPERATION_ID(${postJson.operation_id})", cc=Some(cc)) { - getAllResourceDocs.find(_.operationId==postJson.operation_id).isDefined + getAllResourceDocs.find(_.operationId==postJson.operation_id.trim).isDefined } (apiCollection, callContext) <- NewStyle.function.getApiCollectionById(apiCollectioId, Some(cc)) apiCollectionEndpoint <- Future{MappedApiCollectionEndpointsProvider.getApiCollectionEndpointByApiCollectionIdAndOperationId(apiCollection.apiCollectionId, postJson.operation_id)}