Skip to content

Commit c4a2892

Browse files
committed
call application_service from cli app
delegate the creation of the issue ID to the application service
1 parent 7d033e0 commit c4a2892

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/fix_cli/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@ target_link_libraries(fix_cli
99
project_warnings
1010
project_options
1111
CONAN_PKG::docopt.cpp
12-
CONAN_PKG::fmt)
12+
CONAN_PKG::fmt
13+
domain
14+
)
1315
target_include_directories(fix_cli PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)

src/fix_cli/app.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#include <fmt/core.h>
55
#include <ostream>
66

7+
#include "application_service.hpp"
8+
79
using namespace fix::cli;
810
using namespace std::string_view_literals;
911

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

5052
if (command == "create"sv) {
51-
out << "Issue created: thi-is-a-new-0000000\n";
53+
domain::application_service application_service;
54+
const auto issue_id = application_service.create("", "");
55+
out << fmt::format("Issue created: {}\n", issue_id);
5256
return EXIT_SUCCESS;
5357
}
5458

0 commit comments

Comments
 (0)