From be53695a0b866bf6b63a360afa2c5c4558471061 Mon Sep 17 00:00:00 2001 From: DavidLazarescu Date: Sun, 5 Nov 2023 10:47:59 +0100 Subject: [PATCH] Added missing domain to endpoint --- src/infrastructure/persistance/app_info_access.cpp | 9 ++++++++- src/infrastructure/persistance/app_info_access.hpp | 3 +++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/infrastructure/persistance/app_info_access.cpp b/src/infrastructure/persistance/app_info_access.cpp index d80bb96bb..2bbf954c0 100644 --- a/src/infrastructure/persistance/app_info_access.cpp +++ b/src/infrastructure/persistance/app_info_access.cpp @@ -1,13 +1,20 @@ #include "app_info_access.hpp" +#include #include "api_error_helper.hpp" #include "endpoints.hpp" namespace infrastructure::persistence { +AppInfoAccess::AppInfoAccess() +{ + QSettings settings; + domain = settings.value("serverHost").toString(); +} + void AppInfoAccess::getNewestAppVersion() { - auto request = createRequest(data::latestAppVersionEndpoint); + auto request = createRequest(domain + data::latestAppVersionEndpoint); auto reply = m_networkAccessManager.get(request); diff --git a/src/infrastructure/persistance/app_info_access.hpp b/src/infrastructure/persistance/app_info_access.hpp index 196af9c94..a87e49355 100644 --- a/src/infrastructure/persistance/app_info_access.hpp +++ b/src/infrastructure/persistance/app_info_access.hpp @@ -15,6 +15,8 @@ class AppInfoAccess : public adapters::IAppInfoAccess Q_OBJECT public: + AppInfoAccess(); + void getNewestAppVersion() override; void downloadBinaries(const QString& packageName) override; @@ -22,6 +24,7 @@ class AppInfoAccess : public adapters::IAppInfoAccess QNetworkRequest createRequest(QUrl url); QNetworkAccessManager m_networkAccessManager; + QString domain; }; } // namespace infrastructure::persistence