Skip to content

Commit

Permalink
call application_service from cli app
Browse files Browse the repository at this point in the history
delegate the creation of the issue ID to the application service
  • Loading branch information
arnemertz committed Aug 13, 2021
1 parent 7d033e0 commit c4a2892
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/fix_cli/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@ target_link_libraries(fix_cli
project_warnings
project_options
CONAN_PKG::docopt.cpp
CONAN_PKG::fmt)
CONAN_PKG::fmt
domain
)
target_include_directories(fix_cli PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
6 changes: 5 additions & 1 deletion src/fix_cli/app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#include <fmt/core.h>
#include <ostream>

#include "application_service.hpp"

using namespace fix::cli;
using namespace std::string_view_literals;

Expand Down Expand Up @@ -48,7 +50,9 @@ int app::run_command(std::string const& command) {
}

if (command == "create"sv) {
out << "Issue created: thi-is-a-new-0000000\n";
domain::application_service application_service;
const auto issue_id = application_service.create("", "");
out << fmt::format("Issue created: {}\n", issue_id);
return EXIT_SUCCESS;
}

Expand Down

0 comments on commit c4a2892

Please sign in to comment.