From f82adab238f4b45d43049687c8e52bf7372ba053 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Thu, 27 Jun 2024 12:22:09 +0200 Subject: Pass StorageConfig and Storage to Serve --- src/buildtool/serve_api/remote/serve_api.hpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/buildtool/serve_api/remote/serve_api.hpp') diff --git a/src/buildtool/serve_api/remote/serve_api.hpp b/src/buildtool/serve_api/remote/serve_api.hpp index 3374e6aa..fd455037 100644 --- a/src/buildtool/serve_api/remote/serve_api.hpp +++ b/src/buildtool/serve_api/remote/serve_api.hpp @@ -36,14 +36,16 @@ class ServeApi final {}; #include "src/buildtool/serve_api/remote/configuration_client.hpp" #include "src/buildtool/serve_api/remote/source_tree_client.hpp" #include "src/buildtool/serve_api/remote/target_client.hpp" +#include "src/buildtool/storage/storage.hpp" #include "src/utils/cpp/expected.hpp" class ServeApi final { public: explicit ServeApi(ServerAddress const& address, + gsl::not_null const& storage, gsl::not_null const& apis) noexcept : stc_{address, &apis->auth}, - tc_{address, apis}, + tc_{address, storage, apis}, cc_{address, &apis->auth} {} ~ServeApi() noexcept = default; @@ -54,11 +56,12 @@ class ServeApi final { [[nodiscard]] static auto Create( RemoteServeConfig const& serve_config, + gsl::not_null const& storage, gsl::not_null const& apis) noexcept -> std::optional { if (serve_config.remote_address) { - return std::make_optional(*serve_config.remote_address, - apis); + return std::make_optional( + *serve_config.remote_address, storage, apis); } return std::nullopt; } -- cgit v1.2.3