File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -82,10 +82,10 @@ class MyController : public oatpp::web::server::api::ApiController {
8282    ENDPOINT_ASYNC_INIT (EchoDtoBody)
8383
8484    Action act () override  {
85-       return  request->readBodyToDtoAsync <MessageDto>(controller->getDefaultObjectMapper ()).callbackTo (&EchoDtoBody::returnResponse);
85+       return  request->readBodyToDtoAsync <oatpp::Object< MessageDto> >(controller->getDefaultObjectMapper ()).callbackTo (&EchoDtoBody::returnResponse);
8686    }
8787
88-     Action returnResponse (const  MessageDto::ObjectWrapper & body){
88+     Action returnResponse (const  oatpp::Object<MessageDto> & body){
8989      return  _return (controller->createDtoResponse (Status::CODE_200, body));
9090    }
9191
Original file line number Diff line number Diff line change 1111 *  Data Transfer Object. Object containing fields only. 
1212 *  Used in API for serialization/deserialization and validation 
1313 */  
14- class  HelloDto  : public  oatpp ::Object  {
14+ class  HelloDto  : public  oatpp ::DTO  {
1515
16-   DTO_INIT (HelloDto, Object )
16+   DTO_INIT (HelloDto, DTO )
1717
1818  DTO_FIELD (String, userAgent, " user-agent"  );
1919  DTO_FIELD (String, message);
2020  DTO_FIELD (String, server);
2121
2222};
2323
24- class  MessageDto  : public  oatpp ::Object  {
24+ class  MessageDto  : public  oatpp ::DTO  {
2525
26-   DTO_INIT (MessageDto, Object )
26+   DTO_INIT (MessageDto, DTO )
2727
2828  DTO_FIELD (String, message);
2929
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments