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 @@ -89,10 +89,10 @@ class MyController : public oatpp::web::server::api::ApiController {
89
89
ENDPOINT_ASYNC_INIT (EchoDtoBody)
90
90
91
91
Action act () override {
92
- return request->readBodyToDtoAsync <MessageDto>(controller->getDefaultObjectMapper ()).callbackTo (&EchoDtoBody::returnResponse);
92
+ return request->readBodyToDtoAsync <oatpp::Object< MessageDto> >(controller->getDefaultObjectMapper ()).callbackTo (&EchoDtoBody::returnResponse);
93
93
}
94
94
95
- Action returnResponse (const MessageDto::ObjectWrapper & body){
95
+ Action returnResponse (const oatpp::Object<MessageDto> & body){
96
96
return _return (controller->createDtoResponse (Status::CODE_200, body));
97
97
}
98
98
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 ::data::mapping::type::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