diff --git a/CMakeLists.txt b/CMakeLists.txt index 17f1eea..9e7dd4c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ add_library(${project_name}-lib ## link libs -find_package(oatpp 1.2.5 REQUIRED) +find_package(oatpp 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 e316ff4..89cdc0f 100644 --- a/src/App.cpp +++ b/src/App.cpp @@ -17,14 +17,11 @@ void run() { AppComponent components; // Create scope Environment components /* create ApiControllers and add endpoints to router */ - auto router = components.httpRouter.getObject(); - - auto myController = MyController::createShared(); - myController->addEndpointsToRouter(router); - + + router->addController(MyController::createShared()); + /* create server */ - oatpp::network::Server server(components.serverConnectionProvider.getObject(), components.serverConnectionHandler.getObject());