Skip to content

Commit c5c7bfd

Browse files
committed
update to the latest oatpp API version.
1 parent b00a1ba commit c5c7bfd

File tree

3 files changed

+8
-13
lines changed

3 files changed

+8
-13
lines changed

CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ add_library(${project_name}-lib
1616

1717
## link libs
1818

19-
find_package(oatpp 1.2.5 REQUIRED)
20-
find_package(oatpp-consul 1.2.5 REQUIRED)
19+
find_package(oatpp 1.3.0 REQUIRED)
20+
find_package(oatpp-consul 1.3.0 REQUIRED)
2121

2222
target_link_libraries(${project_name}-lib
2323
PUBLIC oatpp::oatpp

azure-pipelines.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
# https://aka.ms/yaml
55

66
jobs:
7-
- job: ubuntu_16_04
8-
displayName: 'Build - Ubuntu 16.04'
7+
- job: ubuntu_20_04
8+
displayName: 'Build - Ubuntu 20.04'
99
continueOnError: false
1010
pool:
11-
vmImage: 'Ubuntu 16.04'
11+
vmImage: 'ubuntu-20.04'
1212
container:
1313
image: lganzzzo/ubuntu-cmake:latest
1414
workspace:

src/App.cpp

+3-8
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,12 @@ void run() {
1818
AppComponent components; // Create scope Environment components
1919

2020
/* create ApiControllers and add endpoints to router */
21-
2221
auto router = components.httpRouter.getObject();
23-
24-
auto DemoController = DemoController::createShared();
25-
DemoController->addEndpointsToRouter(router);
26-
27-
auto healthController = HealthController::createShared();
28-
healthController->addEndpointsToRouter(router);
22+
23+
router->addController(DemoController::createShared());
24+
router->addController(HealthController::createShared());
2925

3026
/* create server */
31-
3227
oatpp::network::Server server(components.serverConnectionProvider.getObject(),
3328
components.serverConnectionHandler.getObject());
3429

0 commit comments

Comments
 (0)