diff --git a/src/API/CAPIClient.cpp b/src/API/CAPIClient.cpp index 70201a4..a7e75b0 100644 --- a/src/API/CAPIClient.cpp +++ b/src/API/CAPIClient.cpp @@ -55,11 +55,11 @@ CAPIClient::~CAPIClient() LogDebug(("CAPIClient::" + BaseURL).c_str(), "~CAPIClient(%s)", BaseURL.c_str()); } -json CAPIClient::Get(std::string aEndpoint, std::string aParameters) +json CAPIClient::Get(std::string aEndpoint, std::string aParameters, bool aBypassCache) { std::string query = GetQuery(aEndpoint, aParameters); - CachedResponse* cachedResponse = GetCachedResponse(query); + CachedResponse* cachedResponse = aBypassCache ? nullptr : GetCachedResponse(query); if (cachedResponse != nullptr) { diff --git a/src/API/CAPIClient.h b/src/API/CAPIClient.h index 2c61fae..4c86008 100644 --- a/src/API/CAPIClient.h +++ b/src/API/CAPIClient.h @@ -37,7 +37,7 @@ class CAPIClient Get: Returns the response string. */ - json Get(std::string aEndpoint, std::string aParameters = ""); + json Get(std::string aEndpoint, std::string aParameters = "", bool aBypassCache = false); json Post(std::string aEndpoint, std::string aParameters = ""); /* diff --git a/src/Main.cpp b/src/Main.cpp index 01a783b..b5eae75 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -168,7 +168,7 @@ namespace Main std::filesystem::remove(Path::F_OLD_DLL); } - json resVersion = RaidcoreAPI->Get("/nexusversion");; + json resVersion = RaidcoreAPI->Get("/nexusversion", "", true); if (resVersion.is_null()) {