diff --git a/CMakeLists.txt b/CMakeLists.txt index 7dab602..073c8ae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,8 +16,8 @@ add_library(${project_name}-lib ## link libs -find_package(oatpp 1.2.5 REQUIRED) -find_package(oatpp-consul 1.2.5 REQUIRED) +find_package(oatpp 1.3.0 REQUIRED) +find_package(oatpp-consul 1.3.0 REQUIRED) target_link_libraries(${project_name}-lib PUBLIC oatpp::oatpp diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7c2f105..2c1a673 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,11 +4,11 @@ # https://aka.ms/yaml jobs: - - job: ubuntu_16_04 - displayName: 'Build - Ubuntu 16.04' + - job: ubuntu_20_04 + displayName: 'Build - Ubuntu 20.04' continueOnError: false pool: - vmImage: 'Ubuntu 16.04' + vmImage: 'ubuntu-20.04' container: image: lganzzzo/ubuntu-cmake:latest workspace: diff --git a/src/App.cpp b/src/App.cpp index 45be382..c62eb20 100644 --- a/src/App.cpp +++ b/src/App.cpp @@ -18,17 +18,12 @@ void run() { AppComponent components; // Create scope Environment components /* create ApiControllers and add endpoints to router */ - auto router = components.httpRouter.getObject(); - - auto DemoController = DemoController::createShared(); - DemoController->addEndpointsToRouter(router); - - auto healthController = HealthController::createShared(); - healthController->addEndpointsToRouter(router); + + router->addController(DemoController::createShared()); + router->addController(HealthController::createShared()); /* create server */ - oatpp::network::Server server(components.serverConnectionProvider.getObject(), components.serverConnectionHandler.getObject());