mirror of
https://github.com/oatpp/oatpp.git
synced 2024-11-27 08:30:07 +08:00
naming fix
This commit is contained in:
parent
d79792b9a9
commit
f9a76661b1
@ -38,7 +38,7 @@ StringPtrWrapper::operator std::string() const {
|
||||
if(m_ptr){
|
||||
return m_ptr->std_str();
|
||||
}
|
||||
return nullptr;
|
||||
return "";
|
||||
}
|
||||
|
||||
namespace __class {
|
||||
|
@ -95,7 +95,7 @@ public:
|
||||
}
|
||||
|
||||
template<class Type>
|
||||
void readBodyToDTO(oatpp::base::PtrWrapper<Type>& objectWrapper,
|
||||
void readBodyToDto(oatpp::base::PtrWrapper<Type>& objectWrapper,
|
||||
const std::shared_ptr<oatpp::data::mapping::ObjectMapper>& objectMapper) const {
|
||||
objectWrapper = objectMapper->readFromString<Type>
|
||||
(protocol::http::incoming::BodyDecoder::decodeToString(headers, bodyStream));
|
||||
|
@ -67,7 +67,7 @@ public:
|
||||
}
|
||||
|
||||
template<class Type>
|
||||
typename Type::PtrWrapper readBodyToDTO(const std::shared_ptr<oatpp::data::mapping::ObjectMapper>& objectMapper) const {
|
||||
typename Type::PtrWrapper readBodyToDto(const std::shared_ptr<oatpp::data::mapping::ObjectMapper>& objectMapper) const {
|
||||
return objectMapper->readFromString<Type>
|
||||
(protocol::http::incoming::BodyDecoder::decodeToString(headers, bodyStream));
|
||||
}
|
||||
|
@ -191,7 +191,7 @@ info->body.type = oatpp::data::mapping::type::__class::String::getType();
|
||||
|
||||
#define OATPP_MACRO_API_CONTROLLER_BODY_DTO(TYPE, NAME, PARAM_LIST) \
|
||||
TYPE NAME; \
|
||||
__request->readBodyToDTO(NAME, getDefaultObjectMapper()); \
|
||||
__request->readBodyToDto(NAME, getDefaultObjectMapper()); \
|
||||
if(NAME.isNull()) { \
|
||||
return ApiController::handleError(Status::CODE_400, "Missing valid body parameter '" #NAME "'"); \
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user