From c6e98b6aa91931758a64fcbb052dcfc1782b0be0 Mon Sep 17 00:00:00 2001 From: snider Date: Thu, 16 Oct 2025 16:08:28 +0100 Subject: [PATCH] adds Block-by-Hash and Block-by-ID controllers with enhanced block retrieval functionality --- .idea/cmake.xml | 2 +- .idea/copyright/LTHN.xml | 6 + .idea/copyright/profiles_settings.xml | 5 +- .idea/editor.xml | 96 ++++++++++++++ .idea/scopes/apiserver.xml | 3 + src/api/ApiServer.cpp | 33 ++++- src/api/ApiServer.hpp | 14 ++ src/api/controller/ApiCoreInfoComponent.hpp | 14 ++ src/api/controller/InfoController.hpp | 43 ------ src/api/controller/path/block.hpp | 122 ++++++++++++++++++ .../block/hash.hpp} | 41 ++++-- src/api/controller/path/block/id.hpp | 98 ++++++++++++++ src/api/controller/path/info.hpp | 57 ++++++++ .../{partials => path}/info/version.hpp | 7 +- src/api/dto/BlockDetailsDto.hpp | 7 +- src/api/dto/TransactionDetailsDto.hpp | 7 +- src/api/dto/VersionDto.hpp | 7 +- src/api/main.cpp | 14 ++ 18 files changed, 493 insertions(+), 83 deletions(-) create mode 100644 .idea/copyright/LTHN.xml create mode 100644 .idea/scopes/apiserver.xml delete mode 100644 src/api/controller/InfoController.hpp create mode 100644 src/api/controller/path/block.hpp rename src/api/controller/{BlockController.hpp => path/block/hash.hpp} (76%) create mode 100644 src/api/controller/path/block/id.hpp create mode 100644 src/api/controller/path/info.hpp rename src/api/controller/{partials => path}/info/version.hpp (77%) diff --git a/.idea/cmake.xml b/.idea/cmake.xml index 2c46369e..2969d964 100644 --- a/.idea/cmake.xml +++ b/.idea/cmake.xml @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/.idea/copyright/LTHN.xml b/.idea/copyright/LTHN.xml new file mode 100644 index 00000000..f0ba8df8 --- /dev/null +++ b/.idea/copyright/LTHN.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml index 312baeb9..b48d188d 100644 --- a/.idea/copyright/profiles_settings.xml +++ b/.idea/copyright/profiles_settings.xml @@ -1,7 +1,8 @@ - + - + + \ No newline at end of file diff --git a/.idea/editor.xml b/.idea/editor.xml index ead1d8a3..0093ef66 100644 --- a/.idea/editor.xml +++ b/.idea/editor.xml @@ -244,5 +244,101 @@