From 94b166b3cbb996b5352e8cf7bf46e257f1fad977 Mon Sep 17 00:00:00 2001 From: Shrikant Kandula Date: Mon, 20 Apr 2020 17:40:42 +0530 Subject: [PATCH] Fix missing `responseMeta` in response for /datasources/test endpoint. --- .../appsmith/server/controllers/DatasourceController.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/DatasourceController.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/DatasourceController.java index 586b212733..052dbcd59c 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/DatasourceController.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/controllers/DatasourceController.java @@ -6,6 +6,7 @@ import com.appsmith.server.domains.Datasource; import com.appsmith.server.dtos.ResponseDTO; import com.appsmith.server.services.DatasourceService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -41,10 +42,6 @@ public class DatasourceController extends BaseController { - ResponseDTO response = new ResponseDTO<>(); - response.setData(testResult); - return response; - }); + .map(testResult -> new ResponseDTO<>(HttpStatus.OK.value(), testResult, null)); } }