Skip to content

Commit

Permalink
Update to the latest oatpp API.
Browse files Browse the repository at this point in the history
  • Loading branch information
lganzzzo committed May 17, 2020
1 parent 55a92c2 commit 294959d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
4 changes: 2 additions & 2 deletions client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ add_library(${project_name}-lib

## link libs

find_package(oatpp 1.0.0 REQUIRED)
find_package(oatpp-websocket 1.0.0 REQUIRED)
find_package(oatpp 1.1.0 REQUIRED)
find_package(oatpp-websocket 1.1.0 REQUIRED)

target_link_libraries(${project_name}-lib
PUBLIC oatpp::oatpp
Expand Down
4 changes: 2 additions & 2 deletions server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ add_library(${project_name}-lib

## link libs

find_package(oatpp 1.0.0 REQUIRED)
find_package(oatpp-websocket 1.0.0 REQUIRED)
find_package(oatpp 1.1.0 REQUIRED)
find_package(oatpp-websocket 1.1.0 REQUIRED)

target_link_libraries(${project_name}-lib
PUBLIC oatpp::oatpp
Expand Down
18 changes: 7 additions & 11 deletions server/src/controller/MyController.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
#include "oatpp/core/macro/codegen.hpp"
#include "oatpp/core/macro/component.hpp"


#include OATPP_CODEGEN_BEGIN(ApiController) //<-- codegen begin

/**
* Controller with WebSocket-connect endpoint.
*/
Expand All @@ -39,11 +42,7 @@ class MyController : public oatpp::web::server::api::ApiController {
objectMapper)){
return std::shared_ptr<MyController>(new MyController(objectMapper));
}

/**
* Begin ENDPOINTs generation ('ApiController' codegen)
*/
#include OATPP_CODEGEN_BEGIN(ApiController)


ENDPOINT_ASYNC("GET", "/", Root) {

Expand Down Expand Up @@ -80,12 +79,9 @@ class MyController : public oatpp::web::server::api::ApiController {
};

// TODO Insert Your endpoints here !!!

/**
* Finish ENDPOINTs generation ('ApiController' codegen)
*/
#include OATPP_CODEGEN_END(ApiController)


};

#include OATPP_CODEGEN_END(ApiController) //<-- codegen end

#endif /* MyController_hpp */

0 comments on commit 294959d

Please sign in to comment.