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)); } }