Fix missing responseMeta in response for /datasources/test endpoint.

This commit is contained in:
Shrikant Kandula 2020-04-20 17:40:42 +05:30
parent 654f1fa61e
commit 94b166b3cb

View File

@ -6,6 +6,7 @@ import com.appsmith.server.domains.Datasource;
import com.appsmith.server.dtos.ResponseDTO; import com.appsmith.server.dtos.ResponseDTO;
import com.appsmith.server.services.DatasourceService; import com.appsmith.server.services.DatasourceService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
@ -41,10 +42,6 @@ public class DatasourceController extends BaseController<DatasourceService, Data
return Mono.just(new DatasourceTestResult(datasource1.getInvalids())); return Mono.just(new DatasourceTestResult(datasource1.getInvalids()));
} }
}) })
.map(testResult -> { .map(testResult -> new ResponseDTO<>(HttpStatus.OK.value(), testResult, null));
ResponseDTO<DatasourceTestResult> response = new ResponseDTO<>();
response.setData(testResult);
return response;
});
} }
} }