Merge branch 'master' into async_executor_with_scheduler

This commit is contained in:
lganzzzo 2019-04-18 03:19:29 +03:00
commit 32523ca6c7

View File

@ -135,9 +135,7 @@ ENDPOINT_ASYNC("POST", "demo/api_async/json", PostJSONAsync) {
ENDPOINT_ASYNC_INIT(PostJSONAsync)
Action act() override {
return request->readBodyToDtoAsync<MyDto>(this,
&PostJSONAsync::onBodyObtained,
controller->getDefaultObjectMapper());
return request->readBodyToDtoAsync<MyDto>(controller->getDefaultObjectMapper()).callbackTo(&PostJSONAsync::onBodyObtained);
}
Action onBodyObtained(const MyDto::ObjectWrapper& dto) {