File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ class AppComponent {
31
31
oatpp::String configText = oatpp::base::StrBuffer::loadFromFile (configPath);
32
32
if (configText) {
33
33
34
- auto profiles = objectMapper->readFromString <ConfigDto ::Fields<ConfigDto::ObjectWrapper >>(configText);
34
+ auto profiles = objectMapper->readFromString <oatpp ::Fields<ConfigDto>>(configText);
35
35
36
36
const char *profileArg = std::getenv (" CONFIG_PROFILE" ); // first read from env variable
37
37
if (profileArg == nullptr ) {
@@ -40,7 +40,7 @@ class AppComponent {
40
40
41
41
OATPP_LOGD (" Server" , " Loading configuration profile '%s'" , profileArg);
42
42
43
- auto profile = profiles-> get (profileArg, nullptr );
43
+ auto profile = profiles. getValueByKey (profileArg, nullptr );
44
44
if (!profile) {
45
45
throw std::runtime_error (" No configuration profile found. Server won't run." );
46
46
}
You can’t perform that action at this time.
0 commit comments