From b972426c186bb7366b009c2e996f73229d2b94db Mon Sep 17 00:00:00 2001 From: lganzzzo Date: Mon, 25 Oct 2021 23:13:33 +0300 Subject: [PATCH] update to the latest oatpp API version. --- CMakeLists.txt | 2 +- azure-pipelines.yml | 6 +++--- src/App.cpp | 9 +++------ 3 files changed, 7 insertions(+), 10 deletions(-) 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()); pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy