Skip to content

Commit

Permalink
Added missing domain to endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidLazarescu committed Nov 5, 2023
1 parent 2e8673c commit be53695
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/infrastructure/persistance/app_info_access.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
#include "app_info_access.hpp"
#include <QSettings>
#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);


Expand Down
3 changes: 3 additions & 0 deletions src/infrastructure/persistance/app_info_access.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@ class AppInfoAccess : public adapters::IAppInfoAccess
Q_OBJECT

public:
AppInfoAccess();

void getNewestAppVersion() override;
void downloadBinaries(const QString& packageName) override;

private:
QNetworkRequest createRequest(QUrl url);

QNetworkAccessManager m_networkAccessManager;
QString domain;
};

} // namespace infrastructure::persistence

0 comments on commit be53695

Please sign in to comment.