File tree 2 files changed +6
-6
lines changed
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 {
82
82
ENDPOINT_ASYNC_INIT (EchoDtoBody)
83
83
84
84
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);
86
86
}
87
87
88
- Action returnResponse (const MessageDto::ObjectWrapper & body){
88
+ Action returnResponse (const oatpp::Object<MessageDto> & body){
89
89
return _return (controller->createDtoResponse (Status::CODE_200, body));
90
90
}
91
91
Original file line number Diff line number Diff line change 11
11
* Data Transfer Object. Object containing fields only.
12
12
* Used in API for serialization/deserialization and validation
13
13
*/
14
- class HelloDto : public oatpp ::Object {
14
+ class HelloDto : public oatpp ::DTO {
15
15
16
- DTO_INIT (HelloDto, Object )
16
+ DTO_INIT (HelloDto, DTO )
17
17
18
18
DTO_FIELD (String, userAgent, " user-agent" );
19
19
DTO_FIELD (String, message);
20
20
DTO_FIELD (String, server);
21
21
22
22
};
23
23
24
- class MessageDto : public oatpp ::Object {
24
+ class MessageDto : public oatpp ::DTO {
25
25
26
- DTO_INIT (MessageDto, Object )
26
+ DTO_INIT (MessageDto, DTO )
27
27
28
28
DTO_FIELD (String, message);
29
29
You can’t perform that action at this time.
0 commit comments