Skip to content

Commit d417eff

Browse files
committed
Update to the latest oatpp API.
1 parent 4f64caa commit d417eff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/AppComponent.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class AppComponent {
3131
oatpp::String configText = oatpp::base::StrBuffer::loadFromFile(configPath);
3232
if (configText) {
3333

34-
auto profiles = objectMapper->readFromString<ConfigDto::Fields<ConfigDto::ObjectWrapper>>(configText);
34+
auto profiles = objectMapper->readFromString<oatpp::Fields<ConfigDto>>(configText);
3535

3636
const char *profileArg = std::getenv("CONFIG_PROFILE"); // first read from env variable
3737
if (profileArg == nullptr) {
@@ -40,7 +40,7 @@ class AppComponent {
4040

4141
OATPP_LOGD("Server", "Loading configuration profile '%s'", profileArg);
4242

43-
auto profile = profiles->get(profileArg, nullptr);
43+
auto profile = profiles.getValueByKey(profileArg, nullptr);
4444
if(!profile) {
4545
throw std::runtime_error("No configuration profile found. Server won't run.");
4646
}

0 commit comments

Comments
 (0)